sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enor...@apache.org
Subject svn commit: r1158505 - in /sling/trunk/samples/accessmanager-ui/src/main/resources: SLING-INF/i18n/resources.json js/accessmanager/accessmanager.js js/accessmanager/accessmanager.min.js libs/sling/servlet/default/ace_body.html.esp
Date Wed, 17 Aug 2011 04:27:43 GMT
Author: enorman
Date: Wed Aug 17 04:27:43 2011
New Revision: 1158505

URL: http://svn.apache.org/viewvc?rev=1158505&view=rev
Log:
SLING-2065 Add ui for the additional JCR 2.0 privileges

Modified:
    sling/trunk/samples/accessmanager-ui/src/main/resources/SLING-INF/i18n/resources.json
    sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.js
    sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.min.js
    sling/trunk/samples/accessmanager-ui/src/main/resources/libs/sling/servlet/default/ace_body.html.esp

Modified: sling/trunk/samples/accessmanager-ui/src/main/resources/SLING-INF/i18n/resources.json
URL: http://svn.apache.org/viewvc/sling/trunk/samples/accessmanager-ui/src/main/resources/SLING-INF/i18n/resources.json?rev=1158505&r1=1158504&r2=1158505&view=diff
==============================================================================
--- sling/trunk/samples/accessmanager-ui/src/main/resources/SLING-INF/i18n/resources.json
(original)
+++ sling/trunk/samples/accessmanager-ui/src/main/resources/SLING-INF/i18n/resources.json
Wed Aug 17 04:27:43 2011
@@ -197,6 +197,31 @@
             "jcr:primaryType": "sling:MessageEntry",
             "sling:key": "label.privilege.jcr:modifyAccessControl",
             "sling:message": "Modify Permissions"
+        },
+        "label.privilege.jcr_lockManagement": {
+            "jcr:primaryType": "sling:MessageEntry",
+            "sling:key": "label.privilege.jcr:lockManagement",
+            "sling:message": "Lock Management"
+        },            
+        "label.privilege.jcr_versionManagement": {
+            "jcr:primaryType": "sling:MessageEntry",
+            "sling:key": "label.privilege.jcr:versionManagement",
+            "sling:message": "Version Management"
+        },            
+        "label.privilege.jcr_nodeTypeManagement": {
+            "jcr:primaryType": "sling:MessageEntry",
+            "sling:key": "label.privilege.jcr:nodeTypeManagement",
+            "sling:message": "NodeType Management"
+        },            
+        "label.privilege.jcr_retentionManagement": {
+            "jcr:primaryType": "sling:MessageEntry",
+            "sling:key": "label.privilege.jcr:retentionManagement",
+            "sling:message": "Retention Management"
+        },            
+        "label.privilege.jcr_lifecycleManagement": {
+            "jcr:primaryType": "sling:MessageEntry",
+            "sling:key": "label.privilege.jcr:lifecycleManagement",
+            "sling:message": "Lifecycle Management"
         },            
                     
         "button.save": {

Modified: sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.js
URL: http://svn.apache.org/viewvc/sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.js?rev=1158505&r1=1158504&r2=1158505&view=diff
==============================================================================
--- sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.js
(original)
+++ sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.js
Wed Aug 17 04:27:43 2011
@@ -205,6 +205,12 @@ AccessManager.Ace = {
 
 			m.setAggregatePrivilege("jcr:readAccessControl", value);
 			m.setAggregatePrivilege("jcr:modifyAccessControl", value);
+
+			m.setAggregatePrivilege("jcr:lockManagement", value);
+			m.setAggregatePrivilege("jcr:versionManagement", value);
+			m.setAggregatePrivilege("jcr:nodeTypeManagement", value);
+			m.setAggregatePrivilege("jcr:retentionManagement", value);
+			m.setAggregatePrivilege("jcr:lifecycleManagement", value);
 		} else {
 			var writeGranted = $("input[name='privilege@jcr:write'][value=granted]:radio:checked");
 			var writeDenied = $("input[name='privilege@jcr:write'][value=denied]:radio:checked");
@@ -227,6 +233,12 @@ AccessManager.Ace = {
 
 			m.setAggregatePrivilege("jcr:readAccessControl", this.value);
 			m.setAggregatePrivilege("jcr:modifyAccessControl", this.value);
+
+			m.setAggregatePrivilege("jcr:lockManagement", this.value);
+			m.setAggregatePrivilege("jcr:versionManagement", this.value);
+			m.setAggregatePrivilege("jcr:nodeTypeManagement", this.value);
+			m.setAggregatePrivilege("jcr:retentionManagement", this.value);
+			m.setAggregatePrivilege("jcr:lifecycleManagement", this.value);
 		});
 		
 		$("input[name='privilege@jcr:write']:radio").bind("change", function(e) {

Modified: sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.min.js
URL: http://svn.apache.org/viewvc/sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.min.js?rev=1158505&r1=1158504&r2=1158505&view=diff
==============================================================================
--- sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.min.js
(original)
+++ sling/trunk/samples/accessmanager-ui/src/main/resources/js/accessmanager/accessmanager.min.js
Wed Aug 17 04:27:43 2011
@@ -1,4 +1,4 @@
-/*
+/*!
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -62,7 +62,12 @@ b.setAggregatePrivilege("jcr:removeNode"
 b.setAggregatePrivilege("jcr:addChildNodes",e);
 b.setAggregatePrivilege("jcr:removeChildNodes",e);
 b.setAggregatePrivilege("jcr:readAccessControl",e);
-b.setAggregatePrivilege("jcr:modifyAccessControl",e)
+b.setAggregatePrivilege("jcr:modifyAccessControl",e);
+b.setAggregatePrivilege("jcr:lockManagement",e);
+b.setAggregatePrivilege("jcr:versionManagement",e);
+b.setAggregatePrivilege("jcr:nodeTypeManagement",e);
+b.setAggregatePrivilege("jcr:retentionManagement",e);
+b.setAggregatePrivilege("jcr:lifecycleManagement",e)
 }else{var c=$("input[name='privilege@jcr:write'][value=granted]:radio:checked");
 var g=$("input[name='privilege@jcr:write'][value=denied]:radio:checked");
 if(c.length>0||g.length>0){var e=c.length>0?"granted":"denied";
@@ -77,7 +82,12 @@ b.setAggregatePrivilege("jcr:removeNode"
 b.setAggregatePrivilege("jcr:addChildNodes",this.value);
 b.setAggregatePrivilege("jcr:removeChildNodes",this.value);
 b.setAggregatePrivilege("jcr:readAccessControl",this.value);
-b.setAggregatePrivilege("jcr:modifyAccessControl",this.value)
+b.setAggregatePrivilege("jcr:modifyAccessControl",this.value);
+b.setAggregatePrivilege("jcr:lockManagement",this.value);
+b.setAggregatePrivilege("jcr:versionManagement",this.value);
+b.setAggregatePrivilege("jcr:nodeTypeManagement",this.value);
+b.setAggregatePrivilege("jcr:retentionManagement",this.value);
+b.setAggregatePrivilege("jcr:lifecycleManagement",this.value)
 });
 $("input[name='privilege@jcr:write']:radio").bind("change",function(h){b.setAggregatePrivilege("jcr:modifyProperties",this.value);
 b.setAggregatePrivilege("jcr:removeNode",this.value);

Modified: sling/trunk/samples/accessmanager-ui/src/main/resources/libs/sling/servlet/default/ace_body.html.esp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/accessmanager-ui/src/main/resources/libs/sling/servlet/default/ace_body.html.esp?rev=1158505&r1=1158504&r2=1158505&view=diff
==============================================================================
--- sling/trunk/samples/accessmanager-ui/src/main/resources/libs/sling/servlet/default/ace_body.html.esp
(original)
+++ sling/trunk/samples/accessmanager-ui/src/main/resources/libs/sling/servlet/default/ace_body.html.esp
Wed Aug 17 04:27:43 2011
@@ -156,7 +156,22 @@ if (!privilegesInfo.canReadAccessControl
 					   drawPrivilegeRow(p, "30px");   
 					
 					   p = accessControlManager.privilegeFromName("jcr:modifyAccessControl");
-					   drawPrivilegeRow(p, "30px");         
+					   drawPrivilegeRow(p, "30px");
+					   
+                       p = accessControlManager.privilegeFromName("jcr:lockManagement");
+                       drawPrivilegeRow(p, "30px");
+
+                       p = accessControlManager.privilegeFromName("jcr:versionManagement");
+                       drawPrivilegeRow(p, "30px");
+
+                       p = accessControlManager.privilegeFromName("jcr:nodeTypeManagement");
+                       drawPrivilegeRow(p, "30px");
+
+                       p = accessControlManager.privilegeFromName("jcr:retentionManagement");
+                       drawPrivilegeRow(p, "30px");
+
+                       p = accessControlManager.privilegeFromName("jcr:lifecycleManagement");
+                       drawPrivilegeRow(p, "30px");
 					%>   
 			      </tbody>
 			   </table>



Mime
View raw message