From 1747f702c9c10340156eb7c4f1fbf37e1805b5f3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 22 Nov 2012 21:56:16 +0000 Subject: [PATCH] remove some others Object parameters type git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1412688 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/redback/system/DefaultSecuritySystem.java | 8 ++++---- .../org/apache/archiva/redback/system/SecuritySystem.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/redback-system/src/main/java/org/apache/archiva/redback/system/DefaultSecuritySystem.java b/redback-system/src/main/java/org/apache/archiva/redback/system/DefaultSecuritySystem.java index c37971c6..ed7618b0 100644 --- a/redback-system/src/main/java/org/apache/archiva/redback/system/DefaultSecuritySystem.java +++ b/redback-system/src/main/java/org/apache/archiva/redback/system/DefaultSecuritySystem.java @@ -145,13 +145,13 @@ public class DefaultSecuritySystem // Authorization: delegate to the authorizer // ---------------------------------------------------------------------------- - public AuthorizationResult authorize( SecuritySession session, Object permission ) + public AuthorizationResult authorize( SecuritySession session, String permission ) throws AuthorizationException { return authorize( session, permission, null ); } - public AuthorizationResult authorize( SecuritySession session, Object permission, Object resource ) + public AuthorizationResult authorize( SecuritySession session, String permission, String resource ) throws AuthorizationException { AuthorizationDataSource source = null; @@ -173,13 +173,13 @@ public class DefaultSecuritySystem return authorizer.isAuthorized( source ); } - public boolean isAuthorized( SecuritySession session, Object permission ) + public boolean isAuthorized( SecuritySession session, String permission ) throws AuthorizationException { return isAuthorized( session, permission, null ); } - public boolean isAuthorized( SecuritySession session, Object permission, Object resource ) + public boolean isAuthorized( SecuritySession session, String permission, String resource ) throws AuthorizationException { return authorize( session, permission, resource ).isAuthorized(); diff --git a/redback-system/src/main/java/org/apache/archiva/redback/system/SecuritySystem.java b/redback-system/src/main/java/org/apache/archiva/redback/system/SecuritySystem.java index ec909c5a..967bca97 100644 --- a/redback-system/src/main/java/org/apache/archiva/redback/system/SecuritySystem.java +++ b/redback-system/src/main/java/org/apache/archiva/redback/system/SecuritySystem.java @@ -53,10 +53,10 @@ public interface SecuritySystem // Authorization // ---------------------------------------------------------------------------- - AuthorizationResult authorize( SecuritySession session, Object permission ) + AuthorizationResult authorize( SecuritySession session, String permission ) throws AuthorizationException; - boolean isAuthorized( SecuritySession session, Object permission ) + boolean isAuthorized( SecuritySession session, String permission ) throws AuthorizationException; /** @@ -67,10 +67,10 @@ public interface SecuritySystem * @return * @throws AuthorizationException */ - AuthorizationResult authorize( SecuritySession session, Object permission, Object resource ) + AuthorizationResult authorize( SecuritySession session, String permission, String resource ) throws AuthorizationException; - boolean isAuthorized( SecuritySession session, Object permission, Object resource ) + boolean isAuthorized( SecuritySession session, String permission, String resource ) throws AuthorizationException; // ----------------------------------------------------------------------------