chore: 🤖 bump ember-can (#3093)
* chore: 🤖 bump ember-can * chore: 🤖 rename "can" service (deprecated) to abilities See https://github.com/minutebase/ember-can/pull/152 * chore: 🤖 bump to ember-can@^8 * chore: 🤖 extend resolver for ember-can v7 breaking change https://github.com/minutebase/ember-can/pull/186
This commit is contained in:
1 parent
29fb5b00cb
commit
b5d33948dc
107 files changed
+542
-435
No files matched your search
@@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route
|
||||
// =services
|
||||
|
||||
@service store;
|
||||
@service can;
|
||||
@service abilities;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route
|
||||
let accounts;
|
||||
|
||||
if (
|
||||
this.can.can('list model', authMethod, {
|
||||
this.abilities.can('list model', authMethod, {
|
||||
collection: 'accounts',
|
||||
})
|
||||
) {
|
||||
|
||||
@@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountRoute extend
|
||||
// =services
|
||||
|
||||
@service store;
|
||||
@service can;
|
||||
@service abilities;
|
||||
@service router;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsNewRoute extends Ro
|
||||
// =services
|
||||
|
||||
@service store;
|
||||
@service can;
|
||||
@service abilities;
|
||||
@service router;
|
||||
|
||||
// =methods
|
||||
@@ -21,7 +21,9 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsNewRoute extends Ro
|
||||
beforeModel() {
|
||||
const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method');
|
||||
if (
|
||||
this.can.cannot('create model', authMethod, { collection: 'accounts' })
|
||||
this.abilities.cannot('create model', authMethod, {
|
||||
collection: 'accounts',
|
||||
})
|
||||
) {
|
||||
this.router.replaceWith('scopes.scope.auth-methods.auth-method.accounts');
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends
|
||||
// =services
|
||||
|
||||
@service store;
|
||||
@service can;
|
||||
@service abilities;
|
||||
|
||||
//=methods
|
||||
|
||||
@@ -21,7 +21,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends
|
||||
async model() {
|
||||
const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method');
|
||||
const { id: auth_method_id } = authMethod;
|
||||
const canListManagedGroups = this.can.can('list model', authMethod, {
|
||||
const canListManagedGroups = this.abilities.can('list model', authMethod, {
|
||||
collection: 'managed-groups',
|
||||
});
|
||||
let managedGroups;
|
||||
|
||||
@@ -10,7 +10,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsNewRoute exten
|
||||
// =services
|
||||
|
||||
@service store;
|
||||
@service can;
|
||||
@service abilities;
|
||||
@service router;
|
||||
|
||||
// =methods
|
||||
@@ -21,7 +21,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsNewRoute exten
|
||||
beforeModel() {
|
||||
const authMethod = this.modelFor('scopes.scope.auth-methods.auth-method');
|
||||
if (
|
||||
this.can.cannot('create model', authMethod, {
|
||||
this.abilities.cannot('create model', authMethod, {
|
||||
collection: 'managed-groups',
|
||||
})
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user