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


##########
app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java:
##########
@@ -112,31 +118,40 @@ public String save() {
                 error = true;
             }
             // one iteration for each line (user) in the members table
+            Map<String, List<String>> changes = new LinkedHashMap<>();
             for (WeblogPermission perms : permsList) {
 
-                String sval = getParameter("perm-" + perms.getUser().getId());
+                User member = perms.getUser();
+                if (member == null) {

Review Comment:
   **Important:** `WeblogPermission.getUser()` goes through 
`getUserByUserName()`, which only finds enabled users, so a disabled member's 
permission returns null here. `Members.jsp` still renders that row with a blank 
name and radio buttons named `perm-`, and this `continue` drops whatever was 
chosen for it, so an admin cannot remove a disabled member. Look the user up 
regardless of enabled state (or key the form field by the permission id), as 
`updateWeblogMembership()` already handles disabled users, and add a test that 
removes a disabled member.



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