public void initialize()
throws RoleProfileException
{
+ getRole( "archiva-repository-manager-base" );
+
mergeRoleProfiles( "system-administrator", "archiva-system-administrator" );
mergeRoleProfiles( "user-administrator", "archiva-user-administrator" );
mergeRoleProfiles( "guest", "archiva-guest" );
--- /dev/null
+package org.apache.maven.archiva.security;
+
+import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile"
+ * role-hint="archiva-repository-manager-base"
+ */
+public class BaseRepositoryManagerRoleProfile
+ extends AbstractRoleProfile
+{
+ /**
+ * Create the Role name for a Repository Manager, using the provided repository id.
+ *
+ */
+ public String getRoleName( )
+ {
+ return ArchivaRoleConstants.BASE_REPOSITORY_MANAGER;
+ }
+
+ public List getOperations()
+ {
+ List operations = new ArrayList();
+
+ operations.add( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION );
+
+ return operations;
+ }
+
+ public boolean isPermanent()
+ {
+ return true;
+ }
+
+ public boolean isAssignable()
+ {
+ return false;
+ }
+}
</requirement>
</requirements>
</component>
+ <component>
+ <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
+ <role-hint>archiva-repository-manager-base</role-hint>
+ <implementation>org.apache.maven.archiva.security.BaseRepositoryManagerRoleProfile</implementation>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.PlexusContainer</role>
+ <field-name>container</field-name>
+ </requirement>
+ </requirements>
+ </component>
<component>
<role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
<role-hint>archiva-repository-manager</role-hint>