Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
f298319 to
eff1941
Compare
| const errorMessage = ref(""); | ||
|
|
||
| const confirmationError = computed(() => { | ||
| return password.value !== passwordConfirmation.value ? trans("profile.register.password_mismatch") : ""; |
There was a problem hiding this comment.
I think here a bool would be the better return and then maybe a second computed for the error message
|
What is still missing is the double opt-in logic where a mail is sent to ensure that the e-mail address also belongs to the user who registers with it |
Agreed, but given the size of the review team, it is better to make small and easy to review Pr. |
| .then(() => { | ||
| errorMessage.value = ""; // Clear error message on success | ||
| toast.add({ severity: "success", summary: trans("profile.register.success"), life: 3000 }); | ||
| router.push({ name: "gallery" }); // Redirect to gallery |
There was a problem hiding this comment.
Pushing to gallery here without a refresh still shows sign up / sign in buttons.
Is there a way to trigger a redirect and a refresh?
There was a problem hiding this comment.
that is weird, because server side we do the login.
This pull request introduces a new user registration feature and includes related updates to configuration, validation, and localization. The changes also include renaming configuration keys for clarity and adding support for enabling or disabling user registration through a configuration setting.
New User Registration Feature:
app/Http/Controllers/ProfileController.php: Added aregistermethod to handle new user registration, including user creation, validation, and automatic login.app/Http/Requests/Profile/RegistrationRequest.php: Introduced a new request class for validating registration data, with rules for username, email, and password.app/Contracts/Http/Requests/HasEmail.phpandapp/Http/Requests/Traits/HasEmailTrait.php: Added an interface and trait for handling email attributes in requests. [1] [2]Configuration Updates:
database/migrations/2025_05_29_231404_user_registration_enabled.php: Added a migration to introduce theuser_registration_enabledconfiguration for toggling user registration.database/migrations/2025_05_29_231905_rename_oauth_user_create_settings.php: Renamed configuration keys for clarity, such asoauth_grant_new_user_upload_rightstogrant_new_user_upload_rights.app/Http/Resources/GalleryConfigs/InitConfig.php: Updated initialization to include theis_registration_enabledproperty based on the new configuration. [1] [2]Localization:
lang/en/profile.php,lang/de/profile.php,lang/fr/profile.php) to include translations for registration-related messages such as "Sign Up" and "Your account has been successfully created." [1] [2] [3] and others)Minor Adjustments:
app/Actions/Oauth/Oauth.php: Updated references to renamed configuration keys for upload and modification rights.