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


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

Review Comment:
   **Important:** The last-admin check and `revokeWeblogPermission()` are 
separate database operations. A concurrent membership change can make the check 
stale before removal. Enforce the last-admin rule in an atomic membership 
operation shared with `Members.save()`, and test concurrent updates.



-- 
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