Package com.ipc.oce.objects

Examples of com.ipc.oce.objects.OCUserRoles


  @Test
  public void listUserRoles() throws JIException {
    OCInfoBaseUsersManager manager = app.getInfoBaseUserManager();
    OCInfoBaseUser user = manager.getCurrentUser();
    user = manager.findByName("Алтухова");
    OCUserRoles roles = user.getRoles();
    System.out.println("Roles ============================");
    for (OCRoleMetadataObject metaObject : roles) {
      System.out.println(metaObject.getName() + ", " + metaObject.getFullName() + ", " + metaObject.getPresentation());
    }
  }
View Full Code Here


  @Test
  public void checkContains() throws JIException {
    OCMetadataRoleCollection allRoles = app.getMetadata().getRoles();
    OCInfoBaseUsersManager manager = app.getInfoBaseUserManager();
    OCInfoBaseUser user = manager.getCurrentUser();
    OCUserRoles userRoles = user.getRoles();
    System.out.println("---------------------------");
    System.out.println("User " + user.getFullName() + " has following roles:");
    for (OCRoleMetadataObject role : allRoles) {
      System.out.println(role.getName() + ": " + userRoles.contains(role));
    }
  }
View Full Code Here

TOP

Related Classes of com.ipc.oce.objects.OCUserRoles

Copyright © 2018 www.massapicom. 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.