fix: Mirage post issue for managed-groups
This commit is contained in:
6 files changed
+31
-13
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()`.
|
||||
|
||||
@@ -2,8 +2,11 @@ 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') || [
|
||||
@@ -17,11 +20,7 @@ export default factory.extend({
|
||||
switch (this.type) {
|
||||
case 'oidc':
|
||||
return {
|
||||
filter: random.word(),
|
||||
};
|
||||
default:
|
||||
return {
|
||||
filter: '',
|
||||
filter: random.words(),
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user