Merge branch 'main' into feature-resource-filter-system
This commit is contained in:
34 files changed
+495
-14
No files matched your search
@@ -5,6 +5,14 @@ import { A } from '@ember/array';
|
||||
|
||||
export default class ManagedGroupModel extends GeneratedManagedGroupModel {
|
||||
// =attributes
|
||||
|
||||
// =error attributes
|
||||
// These attributes exist solely to capture errors on nested fields.
|
||||
// See the application adapter's error normalization method for
|
||||
// more information.
|
||||
|
||||
@attr('string', { readOnly: true }) attributes_filter;
|
||||
|
||||
/**
|
||||
* Members is read-only under normal circumstances. But members can
|
||||
* be persisted via calls to `addMembers()` or `removeMembers()`.
|
||||
|
||||
@@ -521,6 +521,9 @@ export default function () {
|
||||
return managedGroups.where({ authMethodId });
|
||||
}
|
||||
);
|
||||
this.get('/managed-groups/:id');
|
||||
this.del('/managed-groups/:id');
|
||||
this.post('/managed-groups');
|
||||
|
||||
/* Uncomment the following line and the Response import above
|
||||
* Then change the response code to simulate error responses.
|
||||
|
||||
@@ -34,7 +34,9 @@ export default factory.extend({
|
||||
user.update({ accountIds: [id] });
|
||||
});
|
||||
|
||||
server.createList('managed-group', 2, { scope, authMethod });
|
||||
if (type === 'oidc') {
|
||||
server.createList('managed-group', 2, { scope, authMethod });
|
||||
}
|
||||
},
|
||||
}),
|
||||
});
|
||||
@@ -1,8 +1,12 @@
|
||||
import factory from '../generated/factories/managed-group';
|
||||
import { random } from 'faker';
|
||||
import permissions from '../helpers/permissions';
|
||||
|
||||
const types = ['oidc'];
|
||||
|
||||
export default factory.extend({
|
||||
id: (i) => `managed-groups-id-${i}`,
|
||||
type: (i) => types[i % types.length],
|
||||
|
||||
authorized_actions: () =>
|
||||
permissions.authorizedActionsFor('managed-group') || [
|
||||
@@ -11,4 +15,13 @@ export default factory.extend({
|
||||
'update',
|
||||
'delete',
|
||||
],
|
||||
|
||||
attributes() {
|
||||
switch (this.type) {
|
||||
case 'oidc':
|
||||
return {
|
||||
filter: random.words(),
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -11,15 +11,4 @@ export default Factory.extend({
|
||||
created_time: () => date.recent(),
|
||||
updated_time: () => date.recent(),
|
||||
version: () => datatype.number(),
|
||||
type: 'oidc',
|
||||
attributes: function () {
|
||||
switch (this.type) {
|
||||
case 'oidc':
|
||||
return {
|
||||
filter: random.words(),
|
||||
};
|
||||
default:
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -22,7 +22,7 @@ export default function (server) {
|
||||
// Auth
|
||||
const globalAuthMethods = server.createList(
|
||||
'auth-method',
|
||||
1,
|
||||
4,
|
||||
{ scope: globalScope },
|
||||
'withAccountsAndUsersAndManagedGroups'
|
||||
);
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user