Files
backroad/app/portainer/rbac/views/roles/roles.controller.js
Chaim Lev-Ari b370193ca3 feat(roles): highlight BE added value (#5673)
* 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
2021-09-28 14:23:59 +13:00

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');
}
}
}