continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r450326 - in /maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security: ./ profile/
Date Wed, 27 Sep 2006 05:45:22 GMT
Author: jmcconnell
Date: Tue Sep 26 22:45:21 2006
New Revision: 450326

URL: http://svn.apache.org/viewvc?view=rev&rev=450326
Log:
add user administrator merging of continuum specific permissions, which we might just want
to dispense with altogether and use the p-sec ones

Added:
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java
  (with props)
Modified:
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?view=diff&rev=450326&r1=450325&r2=450326
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
Tue Sep 26 22:45:21 2006
@@ -25,6 +25,12 @@
 {
     public static final String DELIMITER = " - ";
 
+    // globalish roles
+    public static final String SYSTEM_ADMINISTRATOR_ROLE = "System Administrator";
+    public static final String USER_ADMINISTRATOR_ROLE = "User Administrator";
+    public static final String REGISTERED_USER_ROLE = "Registered User";
+    public static final String GUEST_ROLE = "Guest";
+
     // roles
     public static final String CONTINUUM_PROJECT_DEVELOPER_ROLE_PREFIX = "Project Developer";
     public static final String CONTINUUM_PROJECT_USER_ROLE_PREFIX = "Project User";

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java?view=diff&rev=450326&r1=450325&r2=450326
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleProfileManager.java
Tue Sep 26 22:45:21 2006
@@ -36,7 +36,7 @@
         throws RoleProfileException
     {
         mergeRoleProfiles( "system-administrator", "continuum-system-administrator" );
-
-        setInitialized( true );
+        mergeRoleProfiles( "user-administrator", "continuum-user-administrator" );
+        setInitialized( true ); //todo remove the initialization idea from profile managers
     }
 }

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java?view=diff&rev=450326&r1=450325&r2=450326
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
Tue Sep 26 22:45:21 2006
@@ -1,8 +1,7 @@
 package org.apache.maven.continuum.security.profile;
 
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-import org.codehaus.plexus.rbac.profile.RoleProfileConstants;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
+import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -38,7 +37,7 @@
 
     public String getRoleName()
     {
-        return RoleProfileConstants.SYSTEM_ADMINISTRATOR_ROLE;
+        return ContinuumRoleConstants.SYSTEM_ADMINISTRATOR_ROLE;
     }
 
     public List getOperations()

Added: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java?view=auto&rev=450326
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java
(added)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java
Tue Sep 26 22:45:21 2006
@@ -0,0 +1,56 @@
+package org.apache.maven.continuum.security.profile;
+
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
+import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
+
+import java.util.ArrayList;
+import java.util.List;
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ContinuumSystemAdministratorRoleProfile:
+ *
+ * @author: Jesse McConnell <jmcconnell@apache.org>
+ * @version: $ID:$
+ *
+ * @plexus.component
+ *   role="org.codehaus.plexus.rbac.profile.RoleProfile"
+ *   role-hint="continuum-user-administrator"
+ */
+public class ContinuumUserAdministratorRoleProfile
+    extends AbstractRoleProfile
+{
+
+    public String getRoleName()
+    {
+        return ContinuumRoleConstants.USER_ADMINISTRATOR_ROLE;
+    }
+
+    public List getOperations()
+    {
+        List operations = new ArrayList();
+        operations.add( ContinuumRoleConstants.CONTINUUM_MANAGE_USERS );
+
+        return operations;
+    }
+
+
+    public boolean isAssignable()
+    {
+        return false;
+    }
+}

Propchange: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumUserAdministratorRoleProfile.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message