Examples of Permission


Examples of com.google.api.ads.dfa.axis.v1_20.Permission

    userRole.setSubnetworkId(subnetworkId);
    userRole.setParentUserRoleId(parentUserRoleId);

    // Create a permission object to represent each permission this user role
    // has.
    Permission permission1 = new Permission();
    permission1.setId(permission1Id);
    Permission permission2 = new Permission();
    permission2.setId(permission2Id);
    Permission[] permissions = new Permission[] {permission1, permission2};

    // Add the permissions to the user role.
    userRole.setPermissions(permissions);
View Full Code Here

Examples of com.google.api.services.drive.model.Permission

   * @throws Exception
   */
  public void shareFileWith(String fileId, String userEmail) throws Exception {
    Drive driveService = getDriveService();
   
    Permission newPermission = new Permission();

    newPermission.setValue(userEmail);
      newPermission.setType("user");
      newPermission.setRole("writer");
   
    driveService.permissions().insert(fileId, newPermission).setSendNotificationEmails(false).execute();
  }
View Full Code Here

Examples of com.google.code.lightssh.project.security.entity.Permission

  public List<LoginAccount> listByPermission(Permission permission) {
    return getDao().listByPermission(permission);
  }
 
  public List<LoginAccount> listByPermission(String token ){
    Permission p = new Permission(token);
    return listByPermission( p );
  }
View Full Code Here

Examples of com.google.gerrit.common.data.Permission

  }

  @Override
  public String render(String varName) {
    if (Permission.isLabel(varName)) {
      return Util.M.label(new Permission(varName).getLabel());
    }

    String desc = all.get(varName);
    if (desc == null) {
      desc = all.get(varName.toLowerCase());
View Full Code Here

Examples of com.ketayao.ketacustom.entity.main.Permission

   
    Collection<String> stringPermissions = new ArrayList<String>();
    for (Role role : roles) {
      List<RolePermission> rolePermissions = role.getRolePermissions();
      for (RolePermission rolePermission : rolePermissions) {
        Permission permission = rolePermission.getPermission();
       
        String resource = permission.getModule().getSn();
        String operate = permission.getSn();
   
        StringBuilder builder = new StringBuilder();
        builder.append(resource + ":" + operate);
       
        shiroUser.getHasModules().put(resource, permission.getModule());
       
        StringBuilder dcBuilder = new StringBuilder();
        for (RolePermissionDataControl rpdc : rolePermission.getRolePermissionDataControls()) {
          DataControl dataControl = rpdc.getDataControl();
          dcBuilder.append(dataControl.getName() + ",");
View Full Code Here

Examples of com.piercey.app.entities.Permission

    final List<?> result = query.list();

    if (result.size() > 0)
      return null;

    final Permission permission = new Permission(permissionName);
    final Serializable entityId = session.save(permission);
   
    return (Permission) session.get(Permission.class, entityId);
  }
View Full Code Here

Examples of com.sishuok.es.sys.permission.entity.Permission

        Resource resource2 = new Resource();
        resource2.setName("234");
        resource2.setIdentity("234");
        resourceService.save(resource2);

        Permission permission1 = new Permission();
        permission1.setName("123");
        permission1.setPermission("abc");
        permissionService.save(permission1);

        Permission permission2 = new Permission();
        permission2.setName("123");
        permission2.setPermission("abc");
        permissionService.save(permission2);

        Role role = new Role();
        role.setName("abc");
        role.setRole("abc");
        role.addResourcePermission(
                new RoleResourcePermission(
                        resource1.getId(),
                        Sets.newHashSet(permission1.getId(), permission2.getId())));

        role.addResourcePermission(
                new RoleResourcePermission(
                        resource2.getId(),
                        Sets.newHashSet(permission1.getId(), permission2.getId())));


        roleService.save(role);
        clear();
        Role dbRole = roleService.findOne(role.getId());
View Full Code Here

Examples of com.sun.star.security.Permission

  }
  //______________________________________________________________________________________________
  static final Permission toPermission( java.security.Permission perm_ )
    throws com.sun.star.uno.RuntimeException
  {
    return new Permission(
      perm_.getClass().getName(), perm_.getName(), perm_.getActions() );
  }
View Full Code Here

Examples of com.vmware.vim25.Permission

        "System.Anonymous", "Global.LogEvent",
        "Global.Diagnostics", "Folder.Create"} );
   
    System.out.println("The new role ID: " + roleId);
   
    Permission perm = new Permission();
    perm.setGroup(false); // false for user, true for group
    perm.setPrincipal("vimaster"); // the vimaster must exist
    perm.setPropagate(true); // propagate down the hierarchy
    perm.setRoleId(roleId);
   
    am.setEntityPermissions( si.getRootFolder(),
        new Permission[] {perm} );
   
    Permission[] ps = am.retrieveEntityPermissions(
View Full Code Here

Examples of com.zycus.pm.api.bo.Permission

    List<BaseRight> baseRights = right.getGroup().getBaseRights();
    if (baseRights.contains(right) == false) {
      throw new IllegalArgumentException("Invalid right provided");
    }
    int highestPriority = right.getPriority();
    Permission currentHighestRight = getPermission(rights, right);
    for (int iCounter = 0; iCounter < baseRights.size(); iCounter++) {
      BaseRight bRight = (BaseRight) baseRights.get(iCounter);
      // in-case this right is not assigned, ignore this one
      if (isRightPresent(rights, right) == false) {
        continue;
      }
      if (highestPriority > bRight.getPriority()) {
        highestPriority = bRight.getPriority();
        currentHighestRight = getPermission(rights, bRight);
      }
    }
    return currentHighestRight.isAllowed();
  }
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.