How to define User/Permission relationship as M:M? The Resource relates to Action as M:M via Permission join table/separate entity. User can have many permissions. The same permission may be assigned to multiple users.

How to define User-Permission relation as M:M? How would it look like in EF?
Just an idea - should there be a terenary relationship in there?  There seems to be a three way relationship between the resource, permission and the user.