refactor: 💡 add global settings link (#2093)
refactor: 💡 add global settings link (#2093)
This commit is contained in:
1 parent
c48fdb2017
commit
9e0467cbf0
7 files changed
+112
-23
No files matched your search
@@ -11,15 +11,20 @@ import generateId from '../helpers/id';
|
||||
export default factory.extend({
|
||||
type: 'global',
|
||||
|
||||
authorized_actions: () =>
|
||||
permissions.authorizedActionsFor('scope') || [
|
||||
'no-op',
|
||||
'read',
|
||||
'update',
|
||||
'delete',
|
||||
'attach-storage-policy',
|
||||
'detach-storage-policy',
|
||||
],
|
||||
authorized_actions() {
|
||||
const authorizedActions = ['no-op', 'read', 'update'];
|
||||
|
||||
// Storage policies can only be attatched to global and org scopes.
|
||||
if (this.type === 'global' || this.type === 'org') {
|
||||
authorizedActions.push('attach-storage-policy', 'detach-storage-policy');
|
||||
}
|
||||
|
||||
if (this.type === 'org' || this.type === 'project') {
|
||||
authorizedActions.push('delete');
|
||||
}
|
||||
|
||||
return permissions.authorizedActionsFor('scope') || authorizedActions;
|
||||
},
|
||||
|
||||
authorized_collection_actions() {
|
||||
const collectionActions = {
|
||||
|
||||
Reference in new issue
Block a user