11-01-2016, 03:12 AM
Now...can you think of a way to replicate this on the page in the Remove and Add permissions group? Basically, I need it to only show the current permissions that can be removed and current permissions that can be added that the user has access to.
E.g. I have John Smith who has access to:
CSR
Logs
User Management
When he views Jane Doe, who has full access (including SA), he only sees CSR, Logs and User Management in the remove permissions and nothing in add permissions, because he cannot remove permissions he does not have access to (MGR and SA).
Jane Doe on the other hand, who is SA and has full permissions, can view all permissions the current user has under remove permissions, and all permission the user can have added under add permissions.
Scott MacDonald is a CSR and User Manager, so when he looks at John Smith, he can see CSR and User Management under remove permissions, but nothing under add permissions.
I think I can do this by duplicating the permission function that is built in to and making a set specifically for the current user, but how can I enforce it to only echo the values that the editing user has that the current user has access to.
Thanks!
Code:
admin_user.php
E.g. I have John Smith who has access to:
CSR
Logs
User Management
When he views Jane Doe, who has full access (including SA), he only sees CSR, Logs and User Management in the remove permissions and nothing in add permissions, because he cannot remove permissions he does not have access to (MGR and SA).
Jane Doe on the other hand, who is SA and has full permissions, can view all permissions the current user has under remove permissions, and all permission the user can have added under add permissions.
Scott MacDonald is a CSR and User Manager, so when he looks at John Smith, he can see CSR and User Management under remove permissions, but nothing under add permissions.
I think I can do this by duplicating the permission function that is built in to
Code:
admin_user.php
Thanks!