Skip to content
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

[PROPOSAL] Admin for Managing All Users #49

Closed
nafiesl opened this issue Apr 10, 2020 · 0 comments · Fixed by #50
Closed

[PROPOSAL] Admin for Managing All Users #49

nafiesl opened this issue Apr 10, 2020 · 0 comments · Fixed by #50

Comments

@nafiesl
Copy link
Owner

nafiesl commented Apr 10, 2020

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:

  1. We have a env var and config to store array of user emails
  2. We take the user emails on the config to determine the system's admin.
  3. Config key: config('app.system_admins');
  4. Config value data type: array (of email addresses).

For example:

  1. We have User A, user B and User C
  2. User A is manager of User B, but not User C
  3. User A can edit User B data, but cannot edit user C data.
  4. We add user A email address on the app.system_admins config
  5. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant