DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21864>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21864

Ability to set default security reference  for role merge generated psml

           Summary: Ability to set default security reference  for role
                    merge generated psml
           Product: Jetspeed
           Version: 1.4b5-dev / CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Profiler
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I created a patch for JetspeedProfilerService to allow a default security 
reference to be added to a user's default.psml when it is created by role 
merging. I needed the ability to enforce top-level tabs that the user cannot 
add, edit, or remove. So I added the ability to JetspeedProfilerService to use 
a default from JetspeedResources.properties. I'm not sure if anyone else needed 
this capability, but I thought I would submit it back to the community just in 
case.


Patch starts below:

Index: src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.j
ava ===================================================================
RCS file: /home/cvspublic/jakarta-
jetspeed/src/java/org/apache/jetspeed/services/p
rofiler/JetspeedProfilerService.java,v
retrieving revision 1.52
diff -u -r1.52 JetspeedProfilerService.java
--- src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.j
ava     23 Jul 2003 19:50:22 -0000      1.52
+++
src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.j
ava     24 Jul 2003 18:35:34 -0000
@@ -77,6 +77,8 @@
 import org.apache.turbine.services.resources.ResourceService;
 
 // jetspeed.om
+import org.apache.jetspeed.om.BaseSecurityReference;
+import org.apache.jetspeed.om.SecurityReference;
 import org.apache.commons.lang.SerializationUtils;
 import org.apache.jetspeed.om.security.JetspeedUser;
 import org.apache.jetspeed.om.security.Role;
@@ -162,7 +164,8 @@
     private final static String CONFIG_ROLE_MERGE = "rolemerge";
     private final static String CONFIG_ROLE_MERGE_CONTROL 
= "rolemerge.control";
     private final static String CONFIG_ROLE_MERGE_CONTROLLER 
= "rolemerge.controller";
-
+       private final static String CONFIG_ROLE_MERGE_SECURITY_REF =
"rolemerge.security_ref";
+       
     // default configuration values
     private final static String DEFAULT_CONFIG_RESOURCE_DEFAULT = "default";
     private final static String DEFAULT_CONFIG_RESOURCE_EXT = ".psml"; @@ -
186,7 +189,8 @@
     String resourceExt;            // the default extension for a
resource
     String rolemergeControl;       // the default control used with
merged role profiles
     String rolemergeController;    // the default controller used with
merged role profiles
-
+       String rolemergeSecurityRef; // the default security reference
for the merged profile
+       
     // MODIFIED: A. Kempf
     String newUserTemplate = DEFAULT_CONFIG_NEWUSER_TEMPLATE;
 
@@ -369,7 +373,14 @@
                 Controller controller = new PsmlController();
                 controller.setName(this.rolemergeController);
                 portlets.setController(controller);
-
+                               
+                               // Add default security reference if one
is defined
+                               if (rolemergeSecurityRef.length() > 0){
+                                       SecurityReference securityRef =
new BaseSecurityReference();
+                                       securityRef.setParent(
rolemergeSecurityRef);
+
portlets.setSecurityRef(securityRef);
+                               }
+                                                         
                 // Set the skin
                 Skin skin = new PsmlSkin();
                 skin.setName(PortalToolkit.getSkin((String)
null).getName());
@@ -866,6 +877,8 @@
 
         rolemergeController = serviceConf.getString( 
CONFIG_ROLE_MERGE_CONTROLLER, DEFAULT_CONFIG_ROLE_MERGE_CONTROLLER );
 
+               rolemergeSecurityRef =
serviceConf.getString(CONFIG_ROLE_MERGE_SECURITY_REF, "");
+               
         if (useFallbackLanguage == false)
         {
             useFallbackCountry = false;
Index: webapp/WEB-INF/conf/JetspeedResources.properties
===================================================================
RCS file: /home/cvspublic/jakarta-jetspeed/webapp/WEB-
INF/conf/JetspeedResources.p
roperties,v
retrieving revision 1.107
diff -u -r1.107 JetspeedResources.properties
--- webapp/WEB-INF/conf/JetspeedResources.properties    23 Jul 2003
23:53:01 -0000  1.107
+++ webapp/WEB-INF/conf/JetspeedResources.properties    24 Jul 2003
18:35:34 -0000
@@ -450,6 +450,9 @@
 # Control to use in merged profile  
services.Profiler.rolemerge.control=TabControl
 
+# Default security reference for merged profile 
+services.Profiler.rolemerge.security_ref=
+
 #########################################
 # Template Locator Service              #
 #########################################

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to