Exemplo n.º 1
0
 /**
  * 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));
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 /**
  * 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);
 }