diff --git a/redback-authorization/redback-authorization-api/src/main/java/org/apache/archiva/redback/authorization/Authorizer.java b/redback-authorization/redback-authorization-api/src/main/java/org/apache/archiva/redback/authorization/Authorizer.java index 0b3051f7..c45230da 100644 --- a/redback-authorization/redback-authorization-api/src/main/java/org/apache/archiva/redback/authorization/Authorizer.java +++ b/redback-authorization/redback-authorization-api/src/main/java/org/apache/archiva/redback/authorization/Authorizer.java @@ -35,4 +35,16 @@ public interface Authorizer AuthorizationResult isAuthorized( AuthorizationDataSource source ) throws AuthorizationException; + + /** + * @return true if this implementation is a final one and not a wrapper + * @since 2.1 + */ + boolean isFinalImplementation(); + + /** + * @return a key to be able to customize label in UI + * @since 2.1 + */ + String getDescriptionKey(); } diff --git a/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java b/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java index 969a8a0a..f7191a85 100644 --- a/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java +++ b/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java @@ -42,4 +42,14 @@ public class LdapAuthorizer { return null; } + + public boolean isFinalImplementation() + { + return true; + } + + public String getDescriptionKey() + { + return "archiva.redback.authorizer.ldap"; + } } diff --git a/redback-authorization/redback-authorization-providers/redback-authorization-open/src/main/java/org/apache/archiva/redback/authorization/open/OpenAuthorizer.java b/redback-authorization/redback-authorization-providers/redback-authorization-open/src/main/java/org/apache/archiva/redback/authorization/open/OpenAuthorizer.java index 7c4b2d48..e9ff0d16 100644 --- a/redback-authorization/redback-authorization-providers/redback-authorization-open/src/main/java/org/apache/archiva/redback/authorization/open/OpenAuthorizer.java +++ b/redback-authorization/redback-authorization-providers/redback-authorization-open/src/main/java/org/apache/archiva/redback/authorization/open/OpenAuthorizer.java @@ -45,4 +45,14 @@ public class OpenAuthorizer return new AuthorizationResult( true, source.getPermission(), null ); } + public boolean isFinalImplementation() + { + return true; + } + + public String getDescriptionKey() + { + return "archiva.redback.authorizer.open"; + } + } diff --git a/redback-rbac/redback-authorization-rbac/src/main/java/org/apache/archiva/redback/authorization/rbac/RbacAuthorizer.java b/redback-rbac/redback-authorization-rbac/src/main/java/org/apache/archiva/redback/authorization/rbac/RbacAuthorizer.java index 4312cb1b..2ce17b4c 100644 --- a/redback-rbac/redback-authorization-rbac/src/main/java/org/apache/archiva/redback/authorization/rbac/RbacAuthorizer.java +++ b/redback-rbac/redback-authorization-rbac/src/main/java/org/apache/archiva/redback/authorization/rbac/RbacAuthorizer.java @@ -186,4 +186,14 @@ public class RbacAuthorizer { this.evaluator = evaluator; } + + public boolean isFinalImplementation() + { + return true; + } + + public String getDescriptionKey() + { + return "archiva.redback.authorizer.rbac"; + } } diff --git a/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/main/java/org/apache/archiva/redback/rbac/memory/MemoryAuthorizer.java b/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/main/java/org/apache/archiva/redback/rbac/memory/MemoryAuthorizer.java index 27d32087..6e492430 100644 --- a/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/main/java/org/apache/archiva/redback/rbac/memory/MemoryAuthorizer.java +++ b/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/main/java/org/apache/archiva/redback/rbac/memory/MemoryAuthorizer.java @@ -54,5 +54,15 @@ public class MemoryAuthorizer return new AuthorizationResult( false, principal, null ); } } + + public boolean isFinalImplementation() + { + return true; + } + + public String getDescriptionKey() + { + return "archiva.redback.authorizer.memory"; + } }