/** * Constructor - initializes this instance of AuthorizationManager for the user * * @param userId * @throws Exception */ public AuthorizationManager(Long userId) throws Exception { NCIASecurityManager mgr = (NCIASecurityManager) SpringApplicationContext.getBean("nciaSecurityManager"); securityRights = mgr.getSecurityMap(String.valueOf(userId)); }
/** * Constructor - initializes this instance of AuthorizationManager with no user name provided. * This constructor should only be used authorizing against "public" data. * * @throws Exception */ public AuthorizationManager() throws Exception { NCIASecurityManager mgr = (NCIASecurityManager) SpringApplicationContext.getBean("nciaSecurityManager"); securityRights = mgr.getSecurityMapForPublicRole(); }
/** * Constructor - initializes this instance of AuthorizationManager for the user * * @param userName * @throws Exception */ public AuthorizationManager(String userName) throws Exception { NCIASecurityManager mgr = (NCIASecurityManager) SpringApplicationContext.getBean("nciaSecurityManager"); String userId = mgr.getUserId(userName); securityRights = mgr.getSecurityMap(userId); }