thank you yousuo for sharing your idea and codes because of that I’ve got an idea on how to do it. but correct me if I’m wrong. Will it be possile to just make a table just as yours but named “roles” that has id primary key, user_id index, roles? and if my table data in roles is: 1 , 2(user id) , admin. then configure in policy that
public function canUpdate(IdentityInterface $user, Article $article)
{
if($user->id == $article->user_id){
return true;
} (code from policy edited)
it will read the data in users tbl and roles tbl role? also will i need to setup another controller roles aka UserAccess in your case?
i would be glad to hear your advice on this thank you.