Repository navigation
Do not try to make user subadmin of group twice - #15564
Conversation
There was a problem hiding this comment.
small o is a type or misnamed method?
There was a problem hiding this comment.
I did not notice that before. But that is how the method is called: https://github.com/owncloud/core/blob/master/lib/private/subadmin.php#L114
There was a problem hiding this comment.
We can rename this btw. without problems. PHP function names are case insensitive:
Note: Function names are case-insensitive, though it is usually good form to call functions as they appear in their declaration.
|
Works 👍 For those who want to use curl to test this: |
If the provisioning api is used to make a user subadmin of a group that user is already a subadmin just return success. Added unit test to ensure things keep working.
|
The inspection completed: 1 new issues, 1 updated code elements |
|
Refer to this link for build results (access rights to CI server needed): |
|
👍 |
Do not try to make user subadmin of group twice
|
@karlitschek should this be backported to stable8 as well? |
|
yes. please backport |
|
Backport PR in #15610 |
[stable8] Backport of #15564

As stated in #13709
If the provisioning api is used to make a user subadmin of a group that user is already a subadmin just return success. In my opinion returning success is better than returning an error since the desired outcome is already in place.
Added unit test to ensure things keep working.
Probably best to get this into 8.1
@karlitschek probably a good idea to backport to 8.0 as well
CC: @DeepDiver1975 @LukasReschke @MorrisJobke