2023-03-01 09:39:41 -06:00
|
|
|
/**
|
2026-01-28 17:09:06 -08:00
|
|
|
* Copyright IBM Corp. 2021, 2026
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2021-11-04 16:05:11 -07:00
|
|
|
import GeneratedManagedGroupModel from '../generated/models/managed-group';
|
2021-10-29 15:01:50 -07:00
|
|
|
import { attr } from '@ember-data/model';
|
2021-11-05 08:55:22 -07:00
|
|
|
import { A } from '@ember/array';
|
2023-07-28 13:52:04 -07:00
|
|
|
import { TYPE_AUTH_METHOD_OIDC, TYPE_AUTH_METHOD_LDAP } from './auth-method';
|
2021-10-28 08:30:28 -07:00
|
|
|
|
2021-11-04 16:05:11 -07:00
|
|
|
export default class ManagedGroupModel extends GeneratedManagedGroupModel {
|
2021-10-29 15:01:50 -07:00
|
|
|
// =attributes
|
2021-11-10 16:12:42 -05:00
|
|
|
|
2021-11-05 08:55:22 -07:00
|
|
|
/**
|
|
|
|
|
* Members is read-only under normal circumstances. But members can
|
|
|
|
|
* be persisted via calls to `addMembers()` or `removeMembers()`.
|
|
|
|
|
*/
|
|
|
|
|
@attr({
|
|
|
|
|
readOnly: true,
|
|
|
|
|
defaultValue: () => A(),
|
|
|
|
|
emptyArrayIfMissing: true,
|
|
|
|
|
})
|
|
|
|
|
member_ids;
|
2023-07-28 13:52:04 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get isOIDC() {
|
|
|
|
|
return this.type === TYPE_AUTH_METHOD_OIDC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get isLDAP() {
|
|
|
|
|
return this.type === TYPE_AUTH_METHOD_LDAP;
|
|
|
|
|
}
|
2021-10-29 15:01:50 -07:00
|
|
|
}
|