-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove addgroup from user #40770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove addgroup from user #40770
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
💥 Acceptance tests pipeline apiWebdavLocksUnlock-maria10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline apiFederationToRoot1-latest-maria10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline apiWebdavMove2-maria10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline apiWebdavUpload1-maria10.2-php7.4 failed. The build has been cancelled. |
💥 Acceptance tests pipeline apiSharingNotificationsToRoot-maria10.2-php7.4 failed. The build has been cancelled. |
In order to check the changes for the displayname, you can use the following patch (*)
(*) This is intended to be used just for testing. DO NOT use it on production. Right now, it isn't possible to use a displayname for local groups, and there is no short term plan for this feature. |
SonarCloud Quality Gate failed. |
There are no tests for js files, and the ajax part can't be unit tested, so it isn't possible to rise the code coverage. |
It would be nice to also have this in 10.13. @phil-davis @jnweiger what to do here? |
IMO this is "a good thing". I don't think that it is really necessary to be able to add a group on-the-fly while adding a user. Groups can be easily created "separately", which is how I imagine it is done 99% of the time anyway. Removing the "add group" stuff from inside the "add user" UI means we can avoid all the edge cases for what happens when the admin has got to various points in the UI workflow, then aborted, or "something happened" when trying to save the user (and new group along with it)... We just need a developer review. Who do we mention for reviews of PRs done by @jvillafanez ? |
Had a look at the code myself and it looks ok. Still it would be good if someone else could review this. @mrow4a or @steelcuts maybe? |
Note: existing UI automated acceptance tests cover adding a group from the "normal" left-hand side of the admin "users page". They also cover adding a user, including selecting existing groups that the user will become a member of. CI passes, so the behavior of all that "ordinary workflow: still works. We never had automated acceptance tests that created a group on-the-fly while creating a user. So that is why there are no acceptance tests to remove when removing that functionality. |
I asked both if they can provide a review. |
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.
minor clarifications, plus what do we do with Sonar?
var $li = $( | ||
'<li class="isgroup" data-gid="' + gid + '" data-usercount="0">' + | ||
' <a href="#" class="dorename">' + | ||
' <span class="groupname">' + gid + '</span>' + | ||
' <span class="groupname">' + name + '</span>' + |
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.
good idea
I've replaced the "id" to "gid". I've also added some changes in the last commit in "settings/js/users/users.js" around lines 737 and 759 in order to retrieve the group info, which seemed to give some problems in some scenarios (the previous behavior might be okish, but there were some errors in the console). |
https://drone.owncloud.com/owncloud/core/38803 Needs a rebase so that CI can run. |
d176d41
to
fa8c662
Compare
Acceptance tests are failing with |
The UI acceptance tests run with an old version of Chrome browser. That is because of issues with the Behat-Mink-selenium test framework, it is not able to control newer versions of Chrome or Firefox that have a newer interface for automated testing. But it means that new JS features cannot be used. In this case, the "null coalescing operator" I changed the syntax back from |
SonarCloud Quality Gate failed.
|
Note: we know why SonarCloud is complaining about the code coverage. IMO this can be merged - drone CI passed. |
Description
This PR includes 3 changes:
The 3rd point should be mostly transparent. The places where the displayname wasn't used are mostly pointing to local groups, whose id and displayname matches. There are still a couple of messages using the group id, but those will require more changes.
Related Issue
https://github.com/owncloud/enterprise/issues/5684
Motivation and Context
The "add group" button was removed because the behavior could cause confusion, specially when creating a new user: the groups weren't created until the user was created, but they appear as such in the web UI.
The changes in the displayname shouldn't be noticed, but the web UI should be more prepared now
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: