|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.engine.security.SecurityHelper
public class SecurityHelper
A utility class with several static methods that are used to either bind the Authentication to the IPentahoSession, retrieve the Authentication from the IPentahoSession, and other various helper functions.
Field Summary | |
---|---|
static String |
DefaultAnonymousRole
|
static String |
DefaultAnonymousUser
|
static String |
SESSION_PRINCIPAL
|
Constructor Summary | |
---|---|
SecurityHelper()
|
Method Summary | |
---|---|
static boolean |
canHaveACLS(ISolutionFile aFile)
|
static Authentication |
getAuthentication(IPentahoSession session,
boolean allowAnonymous)
Looks in the provided session to get the ACEGI Authentication object out. |
static Principal |
getPrincipal(IPentahoSession session)
Gets the java.security.principal object from the IPentahoSession object |
static boolean |
hasAccess(IAclHolder aHolder,
int actionOperation,
IPentahoSession session)
|
static boolean |
hasAccess(IRepositoryFile aFile,
int actionOperation,
IPentahoSession session)
Utility method for access negotiation. |
static boolean |
isGranted(IPentahoSession session,
GrantedAuthority role)
Utility method that communicates with the installed ACLVoter to determine whether a particular role is granted to the specified user. |
static boolean |
isPentahoAdministrator(IPentahoSession session)
Utility method that communicates with the installed ACLVoter to determine administrator status |
static void |
setPrincipal(Principal principal,
IPentahoSession session)
Sets the java.security.principal object into the IPentahoSession object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SESSION_PRINCIPAL
public static final String DefaultAnonymousRole
public static final String DefaultAnonymousUser
Constructor Detail |
---|
public SecurityHelper()
Method Detail |
---|
public static Authentication getAuthentication(IPentahoSession session, boolean allowAnonymous)
session
- Users' IPentahoSession objectallowAnonymous
- If true, will return an anonymous Authentication object.
public static Principal getPrincipal(IPentahoSession session)
session
- The users' session
public static void setPrincipal(Principal principal, IPentahoSession session)
principal
- The principal from the servlet contextsession
- The users' IPentahoSession objectpublic static boolean isPentahoAdministrator(IPentahoSession session)
session
- The users IPentahoSession object
public static boolean isGranted(IPentahoSession session, GrantedAuthority role)
session
- The users' IPentahoSessionrole
- The role to look for
public static boolean canHaveACLS(ISolutionFile aFile)
aFile
-
public static boolean hasAccess(IAclHolder aHolder, int actionOperation, IPentahoSession session)
public static boolean hasAccess(IRepositoryFile aFile, int actionOperation, IPentahoSession session)
aFile
- actionOperation
- session
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |