Fixed settings menu entry and group deletion
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
0e5b0fcef0
commit
72a76060bf
6 changed files with 7630 additions and 32 deletions
|
@ -247,7 +247,7 @@ class NavigationManager implements INavigationManager {
|
|||
'type' => 'settings',
|
||||
'id' => 'core_users',
|
||||
'order' => 4,
|
||||
'href' => $this->urlGenerator->linkToRoute('settings_users'),
|
||||
'href' => $this->urlGenerator->linkToRoute('settings.Users.usersList'),
|
||||
'name' => $l->t('Users'),
|
||||
'icon' => $this->urlGenerator->imagePath('settings', 'users.svg'),
|
||||
]);
|
||||
|
|
|
@ -220,7 +220,7 @@ class UsersController extends Controller {
|
|||
$groupsInfo->setSorting($sortGroupsBy);
|
||||
list($adminGroup, $groups) = $groupsInfo->get();
|
||||
|
||||
if ($isAdmin) {
|
||||
if ($this->isAdmin) {
|
||||
$subAdmins = $this->groupManager->getSubAdmin()->getAllSubAdmins();
|
||||
// New class returns IUser[] so convert back
|
||||
$result = [];
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7599
settings/package-lock.json
generated
Normal file
7599
settings/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -63,7 +63,7 @@ export default {
|
|||
orderBy: this.$store.getters.getServerData.sortGroups,
|
||||
userCount: this.$store.getters.getServerData.userCount
|
||||
});
|
||||
this.$store.dispatch('getPasswordPolicyMinLength');
|
||||
//this.$store.dispatch('getPasswordPolicyMinLength');
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -241,7 +241,7 @@ export default {
|
|||
item.utils.actions = [{
|
||||
icon: 'icon-delete',
|
||||
text: t('settings', 'Remove group'),
|
||||
action: function() {self.removeGroup(item.id)}
|
||||
action: function() {self.removeGroup(group.id)}
|
||||
}];
|
||||
};
|
||||
return item;
|
||||
|
@ -249,12 +249,12 @@ export default {
|
|||
|
||||
// Adjust data
|
||||
let adminGroup = groups.find(group => group.id == 'admin');
|
||||
let disabledGroupIndex = groups.findIndex(group => group.id == 'disabled');
|
||||
let disabledGroup = groups[disabledGroupIndex];
|
||||
if (adminGroup.text) {
|
||||
let disabledGroupIndex = groups.findIndex(group => group.id == 'disabled');
|
||||
let disabledGroup = groups[disabledGroupIndex];
|
||||
if (adminGroup && adminGroup.text) {
|
||||
adminGroup.text = t('settings', 'Admins'); // rename admin group
|
||||
}
|
||||
if (disabledGroup.text) {
|
||||
if (disabledGroup && disabledGroup.text) {
|
||||
disabledGroup.text = t('settings', 'Disabled users'); // rename disabled group
|
||||
if (disabledGroup.utils.counter === 0) {
|
||||
groups.splice(disabledGroupIndex, 1); // remove disabled if empty
|
||||
|
|
Loading…
Reference in a new issue