* refactor(settings): backport auth views (#5705) * feat(roles): highlight BE added value * feat(roles): show default for standard user * fix(feature-flags): replace feature id * feat(roles): show no users when limited to be
21 lines
482 B
JavaScript
21 lines
482 B
JavaScript
import _ from 'lodash-es';
|
|
|
|
export default class RolesController {
|
|
/* @ngInject */
|
|
constructor(Notifications, RoleService) {
|
|
this.Notifications = Notifications;
|
|
this.RoleService = RoleService;
|
|
}
|
|
|
|
async $onInit() {
|
|
this.roles = [];
|
|
|
|
try {
|
|
this.roles = await this.RoleService.roles();
|
|
this.roles = _.orderBy(this.roles, 'Priority', 'asc');
|
|
} catch (err) {
|
|
this.Notifications.error('Failure', err, 'Unable to retrieve roles');
|
|
}
|
|
}
|
|
}
|