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

[Authorization] User, Roles and Gates #5

Open
8 of 9 tasks
hanisirfan opened this issue Dec 6, 2020 · 1 comment
Open
8 of 9 tasks

[Authorization] User, Roles and Gates #5

hanisirfan opened this issue Dec 6, 2020 · 1 comment
Labels
stays-open Issue that will forever be open :>
Projects

Comments

@hanisirfan
Copy link
Member

hanisirfan commented Dec 6, 2020

Roles in this system.

This issue will always be open.

SuperAdmin

Given to a username named admin.
Technically this user will be able to do everything that an admin couldn't do like adding or deleting another admin.

Admin

The default user with the username admin will be created automatically and cannot be changed or deleted by another admin. This user have supremacy above all other user.

Permissions:

  • Have access to all of the system.
  • Administration page.
  • Change, delete or disable a user.
  • View and download users profile.
  • Add/Remove a classroom. Assign a lecturer as coordinator. Add users (student) into the classroom.
  • Approve a request of a warning letter / Issue a warning letter to students.
  • More to add.

Student

Permissions:

  • View their own profile.
  • View and download semester transcript.
  • More to add.

Lecturer

Permissions:

  • If a lecturer is coordinator of a classroom:
    • They can view and download users (student) profile under that classroom.
    • Add/Update student semester transcript.
    • Add/Remove a student from a classroom.
  • Request for a warning letter to be issued to students (if they commit an offense such as: insulting the lecturer).
  • More to add.

Gates

  • authUser - Check whether current authenticated user allowed to access the page. Ex: User Profile.
  • authLecturer - Check if lecturer could access anything allowed for them.
  • authCoordinator - Check if lecturer is a classroom coordinator of a student.
  • authAdmin - Check whether current authenticated user is admin.
  • authSuperAdmin - Check whether current authenticated user is super admin.
  • authClassroomActive - Check whether current authenticated student's classroom is active.

Middleware

  • auth - Default Laravel auth middleware. Check if user is authenticated. If not redirect to / aka login page.
  • userIsAdmin - Check if current authenticated user is an Admin. If not, abort with 403.
  • userIsSuperAdmin - Check if current authenticated user is an SuperAdmin. If not, abort with 403.
@hanisirfan hanisirfan added feature stays-open Issue that will forever be open :> labels Dec 6, 2020
@hanisirfan hanisirfan added this to Stay Active in User System Dec 10, 2020
@hanisirfan hanisirfan moved this from Stay Active to Done in User System Jan 18, 2021
@hanisirfan
Copy link
Member Author

hanisirfan commented Feb 22, 2021

Added #4 here.

@hanisirfan hanisirfan changed the title [Authorization] User and Roles [Authorization] User, Roles and Gates Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stays-open Issue that will forever be open :>
Projects
No open projects
Development

No branches or pull requests

1 participant