Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.x-feature/permission-denied-re…
Browse files Browse the repository at this point in the history
…sponse' into 2.x-feature/permission-denied-response
  • Loading branch information
we-vikram-wri231 committed Jan 19, 2024
2 parents daafd88 + 0b10c6c commit 6ce454e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Http/Controllers/Backend/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ public function updateItem(Request $request,$id): JsonResponse
public function deleteItem(Request $request,$id): JsonResponse
{
$permission_slugs = ['can-update-users','can-delete-users'];

$permission_response = Auth::user()->hasPermissions($permission_slugs);

if(isset($permission_response['success']) && $permission_response['success'] == false) {
Expand Down Expand Up @@ -478,7 +477,6 @@ public function postActions(Request $request, $action) : JsonResponse
case 'bulk-delete':

$permission_slugs = ['can-update-users','can-delete-users'];

$permission_response = Auth::user()->hasPermissions($permission_slugs);

if(isset($permission_response['success']) && $permission_response['success'] == false) {
Expand All @@ -492,7 +490,6 @@ public function postActions(Request $request, $action) : JsonResponse
case 'toggle-role-active-status':

$permission_slugs = ['can-manage-users','can-update-users'];

$permission_response = Auth::user()->hasPermissions($permission_slugs);

if(isset($permission_response['success']) && $permission_response['success'] == false) {
Expand Down

0 comments on commit 6ce454e

Please sign in to comment.