Feb 28, 2019 01:17 AM|Ackerly Xu|LINK
Don't know clearly about your situation, only if you could get the actions belonging to the current user , the filter could works well.
But every time you change the role of the user , you should make your database to change also.
That is to say you only need to change relationship table between user and role , another user table is not necessary in filterAction.
For example , another user table stores user's detailed information , such as education, avatar, hobby ... , then it is not needed. You don't need to create equal to image.
Only when you need the another table's information , you need the image.
Custom Roles only means changing the relationship between Role and User.
For example, your user tables and role table.
ru_id user_id role_idAppRole role_id role_nameAnotyherUserTable id extraInformation appuserId
When you change role of a user, you only need to change AppRoleUser table, and don't need to change the AnotyherUserTable.