diff --git a/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java b/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java index 496495c15..c94fbac30 100644 --- a/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java +++ b/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java @@ -29,9 +29,14 @@ import java.util.List; public class RepositoryManagerDynamicRoleProfile extends AbstractDynamicRoleProfile { - public String getRoleName( String string ) + /** + * Create the Role name for a Repository Manager, using the provided repository id. + * + * @param repoId the repository id + */ + public String getRoleName( String repoId ) { - return ArchivaRoleConstants.REPOSITORY_MANAGER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + string; + return ArchivaRoleConstants.REPOSITORY_MANAGER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + repoId; } public List getOperations() diff --git a/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java b/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java index 2dee2f9b3..91c730d20 100644 --- a/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java +++ b/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java @@ -28,9 +28,14 @@ import java.util.ArrayList; public class RepositoryObserverDynamicRoleProfile extends AbstractDynamicRoleProfile { - public String getRoleName( String string ) + /** + * Create the Role name for a Repository Observer, using the provided repository id. + * + * @param repoId the repository id + */ + public String getRoleName( String repoId ) { - return ArchivaRoleConstants.REPOSITORY_OBSERVER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + string; + return ArchivaRoleConstants.REPOSITORY_OBSERVER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + repoId; } public List getOperations()