Merge pull request #10688 from nextcloud/fix/10492/disabled-users-navigation

Fixes hiding the disabled users nav item if there are no disabled users
This commit is contained in:
Roeland Jago Douma 2018-08-15 09:24:30 +02:00 committed by GitHub
commit 6ed87c0c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -323,7 +323,7 @@ export default {
if (disabledGroup && disabledGroup.text) {
disabledGroup.text = t('settings', 'Disabled users'); // rename disabled group
disabledGroup.icon = 'icon-disabled-users'; // set icon
if (disabledGroup.utils.counter === 0) {
if (!disabledGroup.utils.counter) {
groups.splice(disabledGroupIndex, 1); // remove disabled if empty
}
}

View File

@ -43,6 +43,20 @@ Feature: users
When I open the "Disabled users" section
Then I see that the list of users contains the user user0
Scenario: users navigation without disabled users
Given I act as Jane
And I am logged in as the admin
And I open the User settings
And I open the "Disabled users" section
And I see that the list of users contains the user disabledUser
And I open the actions menu for the user disabledUser
And I see that the "Enable user" action in the disabledUser actions menu is shown
When I click the "Enable user" action in the disabledUser actions menu
Then I see that the section "Disabled users" is not shown
# check again after reloading the settings
When I open the User settings
Then I see that the section "Disabled users" is not shown
Scenario: assign user to a group
Given I act as Jane
And I am logged in as the admin