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 several changes to the permissions and roles system, updates various controllers and policies, and includes some dependency updates. The most significant changes are detailed below:
Permissions and Roles Enhancements:
PUBLISH_INTERNAL_REPORTS
andUPDATE_PUBLICATIONS
inUserPermission
enum (app/Enums/Permissions/UserPermission.php
).UserRole
enum to include new roles (EDITOR
andCHIEF_EDITOR
), and restructured the permissions method to support these roles (app/Enums/Permissions/UserRole.php
). [1] [2]Controllers and Policies Updates:
PublicationController
to check user permissions for viewing and updating publications, and added a newpublish
method inPublicationPolicy
to handle publication permissions (app/Http/Controllers/PublicationController.php
,app/Policies/PublicationPolicy.php
). [1] [2] [3] [4] [5] [6] [7]AuthorController
to useGate::authorize
for authorization checks and corrected the author creation method (app/Http/Controllers/AuthorController.php
).Filament Resource Enhancements:
UserResource
to display role labels and colors dynamically using theUserRole
enum (app/Filament/Resources/UserResource.php
). [1] [2] [3]Dependency and Configuration Updates:
^11.36.1
incomposer.json
(composer.json
).MediaPolicy
registration fromAuthServiceProvider
toAppServiceProvider
and added a new method to configure gates (app/Providers/AppServiceProvider.php
,app/Providers/AuthServiceProvider.php
). [1] [2] [3] [4]These changes collectively improve the system's role and permission management, enhance authorization checks, and update dependencies for better performance and security.