server/users: let administrators add new users

* Added functionality for administrators to directly add users to the
  application
* Added permission users:create:any to handle level that users are
  allowed to create other users
* Moved old permission users:create to users:create:self
This commit is contained in:
ReAnzu
2018-02-23 22:05:58 -06:00
committed by rr-
parent a1fbeb91a0
commit 4b3529272e
5 changed files with 28 additions and 10 deletions

View File

@ -47,10 +47,12 @@ class TopNavigationController {
topNavigation.hide('users');
}
if (api.isLoggedIn()) {
topNavigation.hide('register');
if (!api.hasPrivilege('users:create:any')) {
topNavigation.hide('register');
}
topNavigation.hide('login');
} else {
if (!api.hasPrivilege('users:create')) {
if (!api.hasPrivilege('users:create:self')) {
topNavigation.hide('register');
}
topNavigation.hide('account');