Permission management for User group in front-end #3432
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for sharing albums with both individual users and user groups. It refactors the sharing-related components to accommodate this new functionality by introducing a unified
UserOrGroup
type and updating the UI and logic accordingly.Support for User and Group Sharing:
UserOrGroup
Type and Utility Functions: Added a newUserOrGroup
type anduseSearchUserGroupComputed
composable to manage shared users and groups, including loading, filtering, and selecting them. (resources/js/composables/search/searchUserGroupComputed.ts
)AlbumCreateShareDialog
,AlbumTransfer
,BulkSharingModal
, andCreateSharing
to handle both user and group IDs when creating sharing permissions. (resources/js/components/forms/album/AlbumCreateShareDialog.vue
,resources/js/components/forms/sharing/BulkSharingModal.vue
, and others) [1] [2] [3]UI Enhancements:
text-primary-emphasis
class for groups. (resources/js/components/forms/album/AlbumCreateShareDialog.vue
,resources/js/components/forms/sharing/ShareLine.vue
) [1] [2]SearchTargetUser
and other components to display both users and groups in dropdowns and lists, with clear visual differentiation. (resources/js/components/forms/album/SearchTargetUser.vue
,resources/js/components/forms/sharing/BulkSharingModal.vue
) [1] [2]Refactoring for Consistency:
LightUserResource
with the newUserOrGroup
type across multiple components for consistency and to support groups. (resources/js/components/forms/album/AlbumCreateShareDialog.vue
,resources/js/components/forms/sharing/CreateSharing.vue
) [1] [2]resources/js/components/forms/album/SearchTargetUser.vue
,resources/js/components/forms/sharing/BulkSharingModal.vue
) [1] [2]These changes enhance the flexibility of the sharing functionality while maintaining a clean and consistent codebase.