feat: 🎸 roles
This commit is contained in:
1 parent
b652f759c8
commit
fc4dab606e
10 files changed
+183
-23
No files matched your search
@@ -29,7 +29,8 @@ export default class CollectionAbility extends Ability {
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasAuthorizedCollectionAction(action) {
|
||||
const { authorized_collection_actions } = this.model;
|
||||
const authorized_collection_actions =
|
||||
(this.model || {}).authorized_collection_actions || {};
|
||||
const collection = this.collection || {};
|
||||
return authorized_collection_actions[collection]?.includes(action);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user