Fix for subadmins edit email address of its users#28351
Conversation
|
@sharidas from what I remember this isn't enough. This would allow any user (not only subadmins) to change the email of anybody else. You need to add a check within the function to make sure the current user is a subadmin and that the subadmin has access to this specific user. (because a subadmin cannot change the email of a user not in their group). Please adjust accordingly. In the same file there should already be examples of how to do this check. |
db430e7 to
7d062ee
Compare
|
I have modified the PR, to make sure that the email address get set if the user is admin or if the user is a belongs to subadmin. |
|
restarted jenkins build |
|
Below are the output of curl command ran on console: |
7d062ee to
ef97ba9
Compare
|
Hmm, I'd expect a JSON response here, not HTML |
|
Below are the logs captured from the console: |
e23e9ee to
df46da6
Compare
The issue was caused because annotation for non admin users to setEmailAddress method was missing. And along with that checks are added so that only admin and subadmin users can edit/set the email address of its users. A subadmin user cannot set/edit the email address which it has not access to. Signed-off-by: Sujith H <sharidasan@owncloud.com>
df46da6 to
14a0d57
Compare
|
|
|
When user successfully sets the email address, the return is null. Else the one in the first. Sorry for the confusion I should have posted in the reverse order :( |
|
was it always null ? I hoped it would be something like "success" or so |
|
@sharidas please backport to stable10 |
|
Regression: #27667 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


The issue was caused because annotation for
non admin users to setEmailAddress method was
missing.
Signed-off-by: Sujith H sharidasan@owncloud.com
Description
This change will help to fix the issue to set/change the email address when logged in as group admin.
Related Issue
Issue: #28035
Motivation and Context
When logged in as group admin and try to create users. Later try to set/modify the email address. This wasn't happening because of NotAdminException. This change will help solve the issue.
How Has This Been Tested?
This has been tested by:
Screenshots (if appropriate):
Types of changes
Checklist: