add @since

This commit is contained in:
Olivier Lamy 2015-02-06 23:10:16 +11:00
parent f77d21b589
commit 47cd662af7
2 changed files with 9 additions and 6 deletions

View File

@ -136,11 +136,6 @@ public class PermissionsInterceptor
securitySystem.authorize( authenticationResult.getUser(), permission, //
StringUtils.isBlank( redbackAuthorization.resource() ) //
? null : redbackAuthorization.resource() );
/*
if ( securitySystem.isAuthorized( securitySession, permission, //
StringUtils.isBlank( redbackAuthorization.resource() ) //
? null : redbackAuthorization.resource() ) )
*/
if ( authenticationResult != null && authorizationResult.isAuthorized() )
{
log.debug( "isAuthorized for permission {}", permission );

View File

@ -74,6 +74,14 @@ public interface SecuritySystem
AuthorizationResult authorize( SecuritySession session, String permission, String resource )
throws AuthorizationException;
/**
* @since 2.3
* @param user
* @param permission
* @param resource
* @return
* @throws AuthorizationException
*/
AuthorizationResult authorize( User user, String permission, String resource )
throws AuthorizationException;