-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
c5da550
to
e695ccc
Compare
9461b18
to
5657532
Compare
c9812a8
to
f45a1ab
Compare
rebased on #90, let's see what happens |
8109037
to
9f3c347
Compare
The assignments are now removed through the server. No need to do this via JS anymore
9f3c347
to
60957d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes needed, as discussed
this.getUsersCurrentRole() | ||
} else { | ||
this.showMessage({ | ||
title: 'Failed to change role.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gettext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
}) | ||
|
||
if (response.status === 201) { | ||
this.getUsersCurrentRole() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use response body for populating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
commit('SET_ROLES', roles || []) | ||
} else { | ||
dispatch('showMessage', { | ||
title: 'Failed to fetch roles.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gettext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't fix. apparently it's not that easy to access $gettext
in vuex store, since it has no access to the Vue instance. Raised this ticket instead, since we are using $gettext in a wrong way: owncloud/web#3984
@@ -11,3 +11,11 @@ Then('user {string} should be displayed in the accounts list on the WebUI', asyn | |||
const userListed = await client.page.accountsPage().isUserListed(username) | |||
return assert.strictEqual(userListed, username) | |||
}) | |||
|
|||
When('the users changes the role of user {string} to {string} using the WebUI', function (username, role) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the user" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this typo
Previously we were fetching the role assignments again. Not necessary, as the request for setting a role already returns the resulting assignment object as a response.
Apparently the step definition for the page reload gets reused from phoenix.
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- ui/helpers/utils.js 2
- ui/helpers/auth.js 3
Complexity decreasing per file
==============================
+ ui/store/index.js -1
Clones added
============
- ui/client/settings/index.js 84
See the complete overview on Codacy |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Split from #54
Todo: