Examples of assertRole()


Examples of com.esri.gpt.framework.security.principal.RoleSet.assertRole()

* Asserts the administrator role.
* @throws NotAuthorizedException if the administrator role has not been granted
*/
private void assertAdministratorRole(User user) throws NotAuthorizedException {
  RoleSet roles = user.getAuthenticationStatus().getAuthenticatedRoles();
  roles.assertRole("gptAdministrator");
}

}
View Full Code Here

Examples of com.esri.gpt.framework.security.principal.RoleSet.assertRole()

* Asserts the administrator role.
* @throws NotAuthorizedException if the administrator role has not been granted
*/
private void assertAdministratorRole(User user) throws NotAuthorizedException {
  RoleSet roles = user.getAuthenticationStatus().getAuthenticatedRoles();
  roles.assertRole("gptAdministrator");
}

/**
* Gets the status indicating whether this publisher is an administrator.
* @return true if this publisher is an administrator
View Full Code Here

Examples of com.esri.gpt.framework.security.principal.RoleSet.assertRole()

  if ((rolesForAction != null) && (rolesForAction.size() > 0)) {
    if (!getWasAuthenticated()) {
      throw new NotAuthorizedException("Not authorized.");
    }
    RoleSet rolesForUser = getAuthenticatedRoles();
    rolesForUser.assertRole(rolesForAction);
  }
}

/**
* Resets the authentication status.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.