d509588cd2
Ember update - update ember-cli, ember-data, and ember to 3.4 series
18 lines
666 B
JavaScript
18 lines
666 B
JavaScript
import { alias } from '@ember/object/computed';
|
|
import DS from 'ember-data';
|
|
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
|
|
|
|
const { attr, belongsTo, hasMany } = DS;
|
|
|
|
export default DS.Model.extend({
|
|
approved: attr('boolean'),
|
|
requestPath: attr('string'),
|
|
requestEntity: belongsTo('identity/entity', { async: false }),
|
|
authorizations: hasMany('identity/entity', { async: false }),
|
|
|
|
authorizePath: lazyCapabilities(apiPath`sys/control-group/authorize`),
|
|
canAuthorize: alias('authorizePath.canUpdate'),
|
|
configurePath: lazyCapabilities(apiPath`sys/config/control-group`),
|
|
canConfigure: alias('configurePath.canUpdate'),
|
|
});
|