-
Notifications
You must be signed in to change notification settings - Fork 6
update policies #184
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
update policies #184
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ class CompanyJobPolicy | |
| public function viewAny(User $user): bool | ||
| { | ||
| return $user->isSuperAdmin() | ||
| || $user->hasVerifiedEmail() | ||
| || $user->can('ViewAny:Jobs'); | ||
| } | ||
|
|
||
|
|
@@ -44,7 +43,7 @@ public function view(?User $user, CompanyJob $job): bool | |
|
|
||
| public function create(User $user): bool | ||
| { | ||
| return $user->hasVerifiedEmail(); | ||
| return true; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the return $user->isSuperAdmin()
|| $user->isAdmin()
|| $user->isHR()
|| $user->can('Create:Jobs'); |
||
| } | ||
|
|
||
| public function update(User $user, CompanyJob $job): bool | ||
|
|
||
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.
Removing the access check for regular users in
viewAnywhile still allowing them to own and update jobs (as seen in theupdateandviewmethods) creates a logical inconsistency. Users who own jobs (such as HR or Admin users) will no longer be able to access the list view in the dashboard (Filament resource). If the intention is to remove the dependency on email verification, it is recommended to replace it with explicit role checks for HR and Admin users to ensure they maintain access to their job listings.