krayin/laravel-crm

Visible an edit icon, on unauthorized user account who don't have permissions for edit person

komal-sh-27 opened this issue · 1 comments

Title:

Visible an edit icon, on unauthorized user account who don't have permissions for edit person

Issue Description:

If I log in as any other user role and that user role doesn't have permission to edit a person but still I can see the edit icon button although the edit button does not edit the user and as expected.

Steps to reproduce:

  1. Add a new user and select user role with contact and organisations options like this:

image

  1. Now login with that newly created user here shows an edit and delete button also. If we have using these button then shows a permission warning:

Screenshot from 2024-04-01 12-24-03

Expected result:

Here it should hide the edit and delete button if the user doesn't have permission to edit or delete any person from the role table.

Actual result

Here shown a edit and delete button but shows a unauthorized in edit button and in delete button shows a unauthorized permission error.

duplicate issue #1196

closing it