You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On current condition, user's data can only be modified by their managers (the one whom user ID stored on users.manager_id column). So we want to create a feature which allow us to set some users to be an admin.
Here is a possible solution without changing any DB structure:
We have a env var and config to store array of user emails
We take the user emails on the config to determine the system's admin.
Config key: config('app.system_admins');
Config value data type: array (of email addresses).
For example:
We have User A, user B and User C
User A is manager of User B, but not User C
User A can edit User B data, but cannot edit user C data.
We add user A email address on the app.system_admins config
User A now can edit all user's data the system (not only User B).
This feature resolves this problem:
Any user can be assigned as system admin to edit any user's data.
The text was updated successfully, but these errors were encountered:
On current condition, user's data can only be modified by their managers (the one whom user ID stored on
users.manager_id
column). So we want to create a feature which allow us to set some users to be an admin.Here is a possible solution without changing any DB structure:
config('app.system_admins');
array
(of email addresses).For example:
app.system_admins
configThis feature resolves this problem:
Any user can be assigned as system admin to edit any user's data.
The text was updated successfully, but these errors were encountered: