Repository navigation
Quick fix to prevent group admin to delete an user - #22793
hugocollignon wants to merge 1 commit into
Conversation
|
By analyzing the blame information on this pull request, we identified @DeepDiver1975, @MorrisJobke and @icewind1991 to be potential reviewers |
|
Thanks a lot for your contribution! Alternatively you can add a comment here where you state that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
| $tr.find('td.remove').append(deleteLink); | ||
| } else if (OC.currentUser === user.name) { | ||
| $tr.find('td.remove a').remove(); | ||
| if (OC.currentUser === 'admin') { |
There was a problem hiding this comment.
Can you elaborate on the portability of this code?
This only checks whether the currently logged-in user is named "admin". I doubt that this is what we want to do here 😉
There was a problem hiding this comment.
To check for admin permission in the JS code, use OC.isUserAdmin().
|
The ticket #3362 is a feature request to make subadmin permissions tweakable, which would imply adding config switches in some places and possibly a UI for admins to configure what subadmin are allowed to do. While this might be a quick fix, this short additional will change the default behavior without providing a way to bring it back. I'm closing this due to lack of feedback. Thank you for your understanding and also for your interest in contributing ! |
|
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. |
Simple patch for #3362