You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2018/05/07 08:45:58 UTC
[sling-org-apache-sling-launchpad-integration-tests] branch master
updated: SLING-7635 - add null check for Authorizable
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-integration-tests.git
The following commit(s) were added to refs/heads/master by this push:
new 6d00403 SLING-7635 - add null check for Authorizable
6d00403 is described below
commit 6d00403830dc5f991b0463db3913ea88b3efd547
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon May 7 10:45:47 2018 +0200
SLING-7635 - add null check for Authorizable
---
.../integration-test/usermanager/privileges-info.json.esp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/integration-test/usermanager/privileges-info.json.esp b/src/main/resources/integration-test/usermanager/privileges-info.json.esp
index 4977081..08bda9c 100644
--- a/src/main/resources/integration-test/usermanager/privileges-info.json.esp
+++ b/src/main/resources/integration-test/usermanager/privileges-info.json.esp
@@ -18,13 +18,14 @@
* under the License.
*/
- var privilegesInfo = sling.getService(Packages.org.apache.sling.jackrabbit.usermanager.AuthorizablePrivilegesInfo);
- var authorizable = resource.adaptTo(Packages.org.apache.jackrabbit.api.security.user.Authorizable);
+var privilegesInfo = sling.getService(Packages.org.apache.sling.jackrabbit.usermanager.AuthorizablePrivilegesInfo);
+var authorizable = resource.adaptTo(Packages.org.apache.jackrabbit.api.security.user.Authorizable);
+var userID = authorizable ? authorizable.getID() : null;
%>
{
"canAddUser" : <%=privilegesInfo.canAddUser(currentSession)%>,
"canAddGroup" : <%=privilegesInfo.canAddGroup(currentSession)%>,
- "canUpdateProperties" : <%=privilegesInfo.canUpdateProperties(currentSession, authorizable.getID())%>,
- "canRemove" : <%=privilegesInfo.canRemove(currentSession, authorizable.getID())%>,
- "canUpdateGroupMembers" : <%=privilegesInfo.canUpdateGroupMembers(currentSession, authorizable.getID())%>
+ "canUpdateProperties" : <%=privilegesInfo.canUpdateProperties(currentSession, userID)%>,
+ "canRemove" : <%=privilegesInfo.canRemove(currentSession, userID)%>,
+ "canUpdateGroupMembers" : <%=privilegesInfo.canUpdateGroupMembers(currentSession, userID)%>
}
--
To stop receiving notification emails like this one, please contact
bdelacretaz@apache.org.