snoopdave commented on code in PR #322:
URL: https://github.com/apache/roller/pull/322#discussion_r4608486393


##########
app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MemberResign.java:
##########
@@ -68,6 +68,10 @@ public String execute() {
     public String resign() {
         try {
             UserManager umgr = 
WebloggerFactory.getWeblogger().getUserManager();
+            if (isLastAdmin(umgr)) {

Review Comment:
   **Important:** The administrator check reads permissions without locking 
them, then revokes the membership later. Concurrent membership changes can 
leave a weblog with no administrator. Move the check and revocation into one 
manager operation that serializes changes for the weblog.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to