-
-
Notifications
You must be signed in to change notification settings - Fork 351
Add backend and frontend for simple invitation links #3433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
@click="copy" | ||
>{{ link }}</span | ||
> | ||
<p class="text-muted">{{ sprintf($t("users.invite.link_is_valit_x_days"), days) }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valit should be valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all the translation files will need an update too, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 2661551
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed aa8758f
This pull request introduces a new feature for generating user invitation links, along with several related improvements to user management functionality and API consistency. Key changes include the addition of an invitation link feature, updates to API endpoints for consistency, and enhancements to the registration process.
New Feature: User Invitation Links
invitationLink
method inUserManagementController
to generate temporary invitation links for user registration, leveraging signed URLs and configurable expiration (user_invitation_ttl
). ([app/Http/Controllers/Admin/UserManagementController.phpR104-R130](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-78067725a56ae103bb435a6a4f662818e59354672e73e1611aeaec9c8bf0631eR104-R130)
)InviteUser.vue
to display and copy invitation links, with a user-friendly modal interface. ([resources/js/components/modals/InviteUser.vueR1-R58](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-466a49115ca708078eece0fde0c59e9b04087db2e01556abb011164caa2530aeR1-R58)
)user_invitation_ttl
to set the expiration time for invitation links, implemented via a migration. ([database/migrations/2025_06_10_220804_user_invitation_ttl.phpR1-R31](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-371532fd4ece9ca2e2a059e3fa21efc4918f4407465a83c34579d52f318ea18dR1-R31)
)API Improvements
POST
,PATCH
,DELETE
) instead of custom route names (e.g.,UserManagement::create
→UserManagement
). ([routes/api_v2.phpL149-R152](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-dba9a30b214808bd1ac63349d1e384b6cbd8d80ef675e4bd7cf0d0ee31c961e8L149-R152)
)UserManagement::invite
route for generating invitation links. ([routes/api_v2.phpL149-R152](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-dba9a30b214808bd1ac63349d1e384b6cbd8d80ef675e4bd7cf0d0ee31c961e8L149-R152)
)Registration Enhancements
RegistrationRequest
to forbid registration when the user is already logged in and to support signed URLs for invitation-based registration. ([app/Http/Requests/Profile/RegistrationRequest.phpL34-R40](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-a14ad85e096cbcd35a05e63e92db6d5363f763da28238a356d00c8eb66161af6L34-R40)
)ProfileService.register
to includesignature
andexpires
parameters for handling signed invitations. ([resources/js/services/profile-service.tsL22-R32](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-03f9125d953b68763446d9a225c48b70b78dc9f445ff68db6e0c11b400ebd166L22-R32)
)RegisterPage.vue
) to parse and use query parameters for signed invitations. ([resources/js/views/RegisterPage.vueR97-R123](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-6b333490831101eb0d7bfa4568d85c036fbaf586fb06a3389bdfc722c08a3ef5R97-R123)
)Frontend Updates for User Management
Users.vue
) to trigger the invitation modal. ([resources/js/views/Users.vueL18-R20](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-3eda16e5e7df3d55625c0f7257195222933cfb9e2cd5c56e50401651b79e2e72L18-R20)
)UserManagementService.invite
method to fetch invitation links. ([resources/js/services/user-management-service.tsL24-R36](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-16f54ae340fbc769b601a09480c0cc59198a8a0b6c7f1a6fda24a9c2c855d1a3L24-R36)
)Tests and Validation
[tests/Feature_v2/User/RegisterTest.phpR87-R112](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-57449503a97137c1c3443211e5ce1b5e6996d8dcd74893830537c7794d8cfa5fR87-R112)
)[[1]](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-b99e6e5dbe7b9e5baccb137f5a90cdcca4da8d64ad22cf2daf831428c1d323ceL27-R38)
,[[2]](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-3910aff3f02feda247afa318f12b1edb192f9d2e2de7022ede133a40450542f2L28-R36)
,[[3]](https://github.com/LycheeOrg/Lychee/pull/3433/files#diff-2e508d1f97930e607aea350bea197c1834484959f97aceb24678cb5d3799f7efL27-R38)
)