You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2003/08/05 10:26:40 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/common NamespaceAccessTokenImpl.java
juergen 2003/08/05 01:26:40
Modified: src/share/org/apache/slide/common
NamespaceAccessTokenImpl.java
Log:
added support of an extern defined ACL semantic. The extern semantic can be specified via the acl_semantics under configuration in the domain.xml file
e.g.
<parameter name="acl_semantics">mypackage.mysemantics.MyACLGrantGantAllSemantic</parameter>
(Eckehard)
Revision Changes Path
1.21 +17 -6 jakarta-slide/src/share/org/apache/slide/common/NamespaceAccessTokenImpl.java
Index: NamespaceAccessTokenImpl.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/NamespaceAccessTokenImpl.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- NamespaceAccessTokenImpl.java 30 Oct 2002 09:56:49 -0000 1.20
+++ NamespaceAccessTokenImpl.java 5 Aug 2003 08:26:40 -0000 1.21
@@ -133,12 +133,23 @@
String acl_syntax = config.getParameter(ACL_SEMANTICS);
if ((acl_syntax != null) && (acl_syntax.equals(LEGACY_ALL_GRANT_BEFORE_DENY ))) {
securityHelper = new SecurityImpl(namespace, namespace.getConfig());
- } else {
+ } else if((acl_syntax != null) && (acl_syntax.equals(ALL_GRANT_BEFORE_DENY ))) {
securityHelper = new SecurityImplAllGrant(namespace, namespace.getConfig());
+ } else if (acl_syntax != null) {
+ try {
+ securityHelper = (Security) Class.forName(acl_syntax).newInstance();
+ if (securityHelper != null) {
+ securityHelper.init(namespace, namespace.getConfig());
}
- } else {
+ }catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ if (securityHelper == null) {
securityHelper = new SecurityImplAllGrant(namespace, namespace.getConfig());
}
+
lockHelper =
new LockImpl(namespace, namespace.getConfig(), securityHelper);
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org