Skip to content

Commit

Permalink
Merge pull request #10688 from nextcloud/fix/10492/disabled-users-nav…
Browse files Browse the repository at this point in the history
…igation

 Fixes hiding the disabled users nav item if there are no disabled users
  • Loading branch information
rullzer committed Aug 15, 2018
2 parents 62a9ec1 + cfcdcbe commit 6ed87c0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion settings/js/settings-vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/settings-vue.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
14 changes: 14 additions & 0 deletions tests/acceptance/features/users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ed87c0

Please sign in to comment.