1
1
101010102019-09-16 12:45:41
Laravel
10101010, 2019-09-16 12:45:41

What is the best way to check permissions on records?

Good afternoon!
There are various types of records: schedule, pairs (study), homework for a pair, grades, groups, students divided into classes.
The meaning is:
Example 1.
Methodists can see, create and edit couples schedules for all groups;
Teachers can see class schedules, only those groups in which they lead pairs, but cannot create or edit;
Students can only see their own schedule.
Example 2.
Students see only their own grades and cannot see other people's grades, they cannot edit them;
Teachers see grades only for groups where they lead and can create and edit them;
The head of the department sees only the grades of students from their department, can edit them, but cannot create them;
Methodist and Head of Education see the grades of all students, but cannot change or add them;
etc. for couples, schedules, students' personal data, etc.
What is the best way to implement access checks for all post types, with CRUD settings?
Maybe it can be done through Middleware and there are good practices?
Or is it better to use a ready-made plugin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2019-09-16
@10101010

There are standard mechanisms for this .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question