Package org.platformlayer.model

Examples of org.platformlayer.model.RoleId


      throw new CliException(msg);
    }
    if (Strings.isNullOrEmpty(roleKey)) {
      throw new CliException("Role is required");
    }
    RoleId role = new RoleId(roleKey);
    userRepository.addUserToProject(username.getKey(), project.getName(), projectSecret,
        Collections.singletonList(role));

    return project;
  }
View Full Code Here


  public List<RoleId> getRoles() {
    List<RoleId> ret = Lists.newArrayList();
    if (joinedRoles != null) {
      for (String key : Splitter.on(",").split(joinedRoles)) {
        ret.add(new RoleId(key));
      }
    }
    return ret;
  }
View Full Code Here

    String name = project.getName();
    int projectId = Integer.parseInt(project.getId());

    List<RoleId> roles = Lists.newArrayList();
    for (Role role : project.getRoles()) {
      roles.add(new RoleId(role.getName()));
    }

    CryptoKey projectSecret = FathomdbCrypto.deserializeKey(project.getSecret());
    return new PlatformlayerProjectAuthorization(user, name, projectSecret, roles, projectId);
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.model.RoleId

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.