Skip to content

Commit

Permalink
MCR-3264 fix small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mewel committed Feb 17, 2025
1 parent 6bacdc2 commit 7744dfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public static void permissionUpdateForID(String permission, String id, String ru
* rule is multiple used
*/
@MCRCommand(syntax = "update permission {0} for id {1} with rulefile {2} described by {3}",
help = "The command updates access rule for a given id of a given permission with a given rule file and"
help = "The command updates access rule for a given id of a given permission with a given rule file and "
+ "description",
order = 61)
public static void permissionFileUpdateForID(String permission, String id, String strFileRule, String description) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class MCRUserServlet extends MCRServlet {

private static final String ATTRIBUTE_REALM = "realm";

private static final String ATTRIBUTE_VALUE = "value";

/**
* Handles requests. The parameter 'action' selects what to do, possible
* values are show, save, delete, password (with id as second parameter).
Expand Down Expand Up @@ -427,7 +429,9 @@ private void updateBasicUserInfo(Element u, MCRUser user) {
.map(attributes -> attributes.getChildren("attribute"))
.orElse(Collections.emptyList());
Set<MCRUserAttribute> newAttrs = attributeList.stream()
.map(a -> new MCRUserAttribute(a.getAttributeValue(ATTRIBUTE_NAME), a.getAttributeValue("value")))
.map(a -> new MCRUserAttribute(
a.getAttributeValue(ATTRIBUTE_NAME),
a.getAttributeValue(ATTRIBUTE_VALUE)))
.collect(Collectors.toSet());
user.getAttributes().retainAll(newAttrs);
newAttrs.removeAll(user.getAttributes());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public JsonObject getContent(String webpageId) throws IOException, JDOMException
public JsonObject getContent(Element e) {
JsonArray sectionArray = this.sectionProvider.toJSON(e);
JsonObject content = new JsonObject();
content.addProperty(JSON_PROPERTY_TYPE, JSON_PROPERTY_CONTENT);
content.addProperty(JSON_PROPERTY_TYPE, "content");
content.add(JSON_PROPERTY_CONTENT, sectionArray);
return content;
}
Expand Down

0 comments on commit 7744dfd

Please sign in to comment.