[
https://issues.apache.org/jira/browse/SLING-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Norman updated SLING-897:
------------------------------
Summary: Updating a property fires the wrong JCR events (was: Setting of a
Property requires remove privilege on node)
Changing the defect title to more accurately reflect the problem.
According to the JCR 2.0 specification, the jcr:modifyProperties is the
privilege to create, modify and remove the properties of a node. In jackrabbit
1.x the error message was bad which made it seem (incorrectly) like the remove
privilege was required. In Jackrabbit 2.x, the error message when attempting
to update a property without the necessary privilege was changed to "not
allowed to add or modify item" which is less confusing.
However, there is an issue with the JCR events that are fired when changing an
existing property. A PROPERTY_CHANGED event is expected, but instead a
PROPERTY_REMOVED and a PROPERTY_ADDED event are sent. I will use this defect
to address that problem.
> Updating a property fires the wrong JCR events
> ----------------------------------------------
>
> Key: SLING-897
> URL: https://issues.apache.org/jira/browse/SLING-897
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Post 2.0.2
> Reporter: christian
> Assignee: Eric Norman
> Priority: Minor
>
> If you set a single value Proeprty with a Post handled by the PostServlet,
> the related property is removed first and than the value is set.
> While the effect is the desired change of the Property's value, it has
> side-effects.
> Et least the connected session has to have remove-privilege to set the
> property.
> Eventing may be unexpected, and other may result.
> Example:
> String path = "/content/node1";
> String pName = "property1";
> Node node = (Node) session.getRootNode().getIem(path);
> try {
> session.checkPermission(path+"/"+pName, "set_property")
> //==allowed
> } catch (AccessControlException) {
> }
> But
> POST "/content/node1"
> property1=test
> => AccessDenied
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.