- Implement extended token lifetime for "Remember Me" functionality
- Add token expiration details to authentication responses
- Update client-side token handling to support dynamic expiration
- Modify authentication middleware to handle token initialization more robustly
- Configure JWT configuration to support longer token lifetimes
* Billing flow redirect
* fix checkout url
* Refactor checkout and subscription flow
- Improve checkout URL generation with ref unwrapping
- Enhance user data handling in subscription modal
- Remove deprecated CheckoutDetailsModal component
- Update form field and register form styling
- Add more robust user data update mechanism
* Refactor checkout and subscription flow
- Improve checkout URL generation with ref unwrapping
- Enhance user data handling in subscription modal
- Remove deprecated CheckoutDetailsModal component
- Update form field and register form styling
- Add more robust user data update mechanism
* Fix accessibility and checkout URL generation
- Add proper label for terms and conditions checkbox in RegisterForm
- Refactor checkout URL generation in SubscriptionModal using computed refs
- Improve form input handling and reactivity
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
- Update .dockerignore with comprehensive ignore patterns for API and client
- Modify docker-compose files to improve service configurations
- Enhance Nginx configuration for development and production environments
- Refactor Dockerfile.api with improved build process
- Add docker-setup.sh script for simplified Docker deployment
- Update update-credentials.vue page with improved UI
- Remove hCaptcha dependency from package-lock.json
- Update PHP configuration and entrypoint scripts
* Readonly User
* Refactor FormPolicy and TemplatePolicy to centralize write operation logic
- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.
This refactoring enhances code clarity and reduces duplication across policy classes.
* Refactor user and workspace permissions handling
- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.
These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.
* Fix isReadonlyUser
* fix pint
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Add reCAPTCHA support and update captcha provider handling
- Introduced reCAPTCHA as an additional captcha provider alongside hCaptcha.
- Updated form request validation to handle different captcha providers based on user selection.
- Added a new validation rule for reCAPTCHA.
- Modified the forms model to include a 'captcha_provider' field.
- Created a migration to add the 'captcha_provider' column to the forms table.
- Updated frontend components to support dynamic rendering of captcha based on the selected provider.
- Enhanced tests to cover scenarios for both hCaptcha and reCAPTCHA.
These changes improve the flexibility of captcha options available to users, enhancing form security and user experience.
* fix pint
* change comment text
* Refactor captcha implementation and integrate new captcha components
- Removed the old RecaptchaV2 component and replaced it with a new implementation that supports both reCAPTCHA and hCaptcha through a unified CaptchaInput component.
- Updated the OpenForm component to utilize the new CaptchaInput for dynamic captcha rendering based on user-selected provider.
- Cleaned up the package.json by removing the deprecated @hcaptcha/vue3-hcaptcha dependency.
- Enhanced form initialization to set a default captcha provider.
- Improved error handling and cleanup for both reCAPTCHA and hCaptcha scripts.
These changes streamline captcha integration, improve maintainability, and enhance user experience by providing a more flexible captcha solution.
* Refactor captcha error messages and localization support
* Refactor registration process to integrate reCAPTCHA
- Replaced hCaptcha implementation with reCAPTCHA in RegisterController and related test cases.
- Updated validation rules to utilize g-recaptcha-response instead of h-captcha-response.
- Modified RegisterForm component to support reCAPTCHA, including changes to the form data structure and component references.
- Enhanced test cases to reflect the new reCAPTCHA integration, ensuring proper validation and response handling.
These changes improve security and user experience during the registration process by adopting a more widely used captcha solution.
* Fix reCAPTCHA configuration and update RegisterForm styling
- Corrected the configuration key for reCAPTCHA in RegisterController from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key'.
- Updated the styling of the Captcha input section in RegisterForm.vue to improve layout consistency.
These changes ensure proper reCAPTCHA functionality and enhance the user interface during the registration process.
* Fix reCAPTCHA configuration in RegisterTest to use the correct key format
- Updated the configuration key for reCAPTCHA in RegisterTest from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key' to ensure proper functionality during tests.
This change aligns the test setup with the recent updates in the reCAPTCHA integration, improving the accuracy of the registration process tests.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Add hCaptcha on register page
* register page captcha test cases
* Refactor integration validation rules to include form context
- Updated the `getValidationRules` method in various integration handlers (Discord, Email, Google Sheets, Slack, Webhook, Zapier) to accept an optional `Form` parameter, allowing for context-aware validation.
- Enhanced the `EmailIntegration` handler to enforce restrictions based on user plans, ensuring free users can only create one email integration per form and can only send to a single email address.
- Added a new test suite for `EmailIntegration` to validate the new restrictions and ensure proper functionality for both free and pro users.
- Introduced loading state management in the `IntegrationModal` component to improve user experience during save operations.
These changes improve the flexibility and user experience of form integrations, particularly for email handling.
* for self-hosted ignore emil validation for spam
* fix pint
* ignore register throttle for testing env
* support new migration for mysql also
* Register page captcha enable if captcha key set
* fix test case
* fix test case
* fix test case
* fix pint
* Refactor RegisterController middleware and update TestCase setup
- Removed environment check for throttling middleware in RegisterController, ensuring consistent rate limiting for the registration endpoint.
- Updated TestCase to disable throttle middleware during tests, allowing for more flexible testing scenarios without rate limiting interference.
* Enhance hCaptcha integration in tests and configuration
- Added hCaptcha site and secret keys to phpunit.xml for testing purposes.
- Updated RegisterTest to configure hCaptcha secret key dynamically, ensuring proper token validation in production environment.
These changes improve the testing setup for hCaptcha, facilitating more accurate simulation of production conditions.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Re-organize a bit controllers
* Added the featureflagcontroller
* Implement feature flags in the front-end
* Clean env files
* Clean console.log messages
* Fix feature flag test
* fix password reset bug
* self hosted mode middleware changes on pages
* fix lint
* wip: self hosted changes
* wip: self hosted frontend changes
* wip self hosted mode changes
* typo correction
* remove commented logic
* fix env variable names
* fix lint issues
* fix minor updates
* #445 Switched from single monolithic docker image to a docker-compose
orchestrated network of services
* Automatically configures shared secret
* Working through some issues
* Use local file storage
* Moved the dockerfiles
* Fixed some issues when building from clean
* Corrected workflow
* Hopefully schedules everything correctly now
* Prep storage for worker process as well
* .env files are required
* Pinned dependency versions
* Disable self hosted in the client as well
* Removed double defaulting logic
* Using regexs is more succinct
* Added FRONT_URL environment variable
* Merge 236e4-self-hosted-mode-changes
* Improve inital user setup
* Finalized the new docker-compose setup
* Fix back-end formatting issues
---------
Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Don Benjamin <don@webhammer.co.uk>
* add api enpoints for adding, removing, updating user to workspace and leaving workspace
* feat: updates client site workspace settings
* refactor and add domain setting ui in modal
* move workspace user functionality to its own component
* adds tests
* fix linting
* updates select input to FlatSelectInput
* moves workspace user role edit to seperated component
* move user adding to its own component
* adds check to usure users exist before checking is admin
* fix loading users
* feat: invite user to team functionality
* fix token coulmn
* fix self host mode changes
* tests for user invite
* Refactor back-end
* Rename variables
* Improve some styling elements + refactor workspace settings
* More styling
* More UI polishing
* More UI fixes
* PHP linting
* Implemented most of the logic for team-functionnality
* Fix user avatar URL
* WIP remove users on cancellation
* Finished pricing for team functionality
* Fix tests
* Fix linting
* Added pricing_enabled helper
* Fix pricing_enabled shortcut
* Debug CI
* Disable pricing when testing
---------
Co-authored-by: LL-Etiane <lukongleinyuyetiane@gmail.com>
Co-authored-by: Lukong Etiane <83535251+LL-Etiane@users.noreply.github.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
* Working on custom radius + input size
* Fix date input clear vertical align
* Moslty finished implementing small size
* Polishing larger theme
* Finish large theme
* Added size/radius options in form editor
* Darken help text, improve switch input help location
* Slight form editor improvement
* Fix styling
* Polish of the form editor