You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ne...@apache.org on 2007/08/06 21:58:46 UTC
svn commit: r563240 -
/lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java
Author: nettings
Date: Mon Aug 6 12:58:45 2007
New Revision: 563240
URL: http://svn.apache.org/viewvc?view=rev&rev=563240
Log:
added some comments.
there is a (to me) totally mysterious conditional regarding the source
of the usecase policy configuration. if you know your way around this
piece of code, could you please chuck out my FIXME: comments and add
some clarification? thanks.
Modified:
lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java
Modified: lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java?view=diff&rev=563240&r1=563239&r2=563240
==============================================================================
--- lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java (original)
+++ lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/ac/usecase/impl/UsecaseAuthorizerImpl.java Mon Aug 6 12:58:45 2007
@@ -62,8 +62,19 @@
= "config/access-control/access-control.xml".replace('/', File.separatorChar);
private SourceCache cache;
+ /**
+ * the configuration URI for this component
+ */
private String configurationUri;
private ServiceManager manager;
+
+ /**
+ * Maps publication IDs to their configuration URIs.
+ * This is a persistent map to avoid unnecessary publication lookups.
+ * Whenever an autorization request for a new publication is dealt with,
+ * the publication's configuration URI is stored, to be re-used on later
+ * occasions (for the lifetime of the component).
+ */
private Map pubId2configUri = new HashMap();
@@ -159,9 +170,19 @@
if (usecase != null) {
String _configurationUri;
+ // FIXME: this is not clear to me. please comment if you are familiar with this code...
+ // check if this component has a configurationURI. iiuc, that would have to be specified
+ // in the relevant patchfile, in this case
+ // src/modules-core/usecase/config/cocoon-xconf/usecase-authorizer.xconf
+ // however, that file does not specify such a URI.
if (getConfigurationURI() != null) {
+ // so this is never called. if it were, usecase permissions would break iiuc.
+ // please clarify this.
_configurationUri = getConfigurationURI();
} else {
+ // ok, here we get the usecase-permissions.xml of the current publication from
+ // its access-control.xml configuration file.
+ // this i understand.
Publication publication = PublicationUtil.getPublication(this.manager, request);
_configurationUri = getConfigurationURI(publication);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org