Updates ACL users.
323810
public function updateAclUsers(AdminObjectAclData $data)
    {
        $aclValues = $data->getAclUsers();
        $form = $data->getAclUsersForm();

        $this->buildAcl($data, $form, $aclValues);
    }
1169643
def changeUserAuthorizations(self, login, user, authorizations):
    
    self.send_changeUserAuthorizations(login, user, authorizations)
    self.recv_changeUserAuthorizations()
1196945
public function update()
    {
        $sync = !empty($this->request->query['sync']) ? true : false;
        if (AcoManager::buildAcos(null, $sync)) {
            $this->Flash->success(__d('user', 'Permissions tree was successfully updated!'));
        } else {
            $this->Flash->danger(__d('user', 'Some errors occur while updating permissions tree.'));
        }

        $this->title(__d('user', 'Update Permissions'));
        $this->redirect($this->referer());
    }
834438
private function updatePermissions()
    {
        $pathNames = $this->resolver->names();
        // These should be moved to PathResolver paths eventually.
        $pathNames[] = '%web%/extensions';
        $pathNames[] = '%web%/thumbs';

        $dirMode = $this->options->getDirMode();
        foreach ($pathNames as $name) {
            $path = $this->resolver->resolve($name);
            if (!$this->filesystem->exists($path)) {
                $this->filesystem->mkdir($path);
            }
            $this->filesystem->chmod($path, $dirMode);
        }
    }
342813
def upgrade():
    """"""
    current_date = datetime.utcnow()

    # Add 'created' and 'updated' columns to RemoteAccount
    _add_created_updated_columns('oauthclient_remoteaccount', current_date)

    # Add 'created' and 'updated' columns to RemoteToken
    _add_created_updated_columns('oauthclient_remotetoken', current_date)

    # Add 'created' and 'updated' columns to UserIdentity
    _add_created_updated_columns('oauthclient_useridentity', current_date)
836900
public function update($appId, $aclId, AclBuilder $input, array $queryParams = [])
    {
        $response = $this->api->applications()->acls()->update($appId, $aclId, $input->toArray(), $queryParams);

        return new AclResponse($response);
    }
1279773
def allow(self, ctx, acls):
        '''
        '''
        for acl in acls:
            if self._identity == acl:
                return True
        return False
217145
private static void addACLPrivileges(String acl, Map<String, Map<String, List<String[]>>> privileges) {
    int equalIndex = acl.lastIndexOf("=");
    int slashIndex = acl.lastIndexOf("/");
    if (equalIndex == -1) {
      return;
    }

    String user = acl.substring(0, equalIndex);
    String grantor = null;
    if (user.isEmpty()) {
      user = "PUBLIC";
    }
    String privs;
    if (slashIndex != -1) {
      privs = acl.substring(equalIndex + 1, slashIndex);
      grantor = acl.substring(slashIndex + 1, acl.length());
    } else {
      privs = acl.substring(equalIndex + 1, acl.length());
    }

    for (int i = 0; i < privs.length(); i++) {
      char c = privs.charAt(i);
      if (c != '*') {
        String sqlpriv;
        String grantable;
        if (i < privs.length() - 1 && privs.charAt(i + 1) == '*') {
          grantable = "YES";
        } else {
          grantable = "NO";
        }
        switch (c) {
          case 'a':
            sqlpriv = "INSERT";
            break;
          case 'r':
          case 'p':
            sqlpriv = "SELECT";
            break;
          case 'w':
            sqlpriv = "UPDATE";
            break;
          case 'd':
            sqlpriv = "DELETE";
            break;
          case 'D':
            sqlpriv = "TRUNCATE";
            break;
          case 'R':
            sqlpriv = "RULE";
            break;
          case 'x':
            sqlpriv = "REFERENCES";
            break;
          case 't':
            sqlpriv = "TRIGGER";
            break;
          // the following can't be granted to a table, but
          // we'll keep them for completeness.
          case 'X':
            sqlpriv = "EXECUTE";
            break;
          case 'U':
            sqlpriv = "USAGE";
            break;
          case 'C':
            sqlpriv = "CREATE";
            break;
          case 'T':
            sqlpriv = "CREATE TEMP";
            break;
          default:
            sqlpriv = "UNKNOWN";
        }

        Map<String, List<String[]>> usersWithPermission = privileges.get(sqlpriv);
        String[] grant = {grantor, grantable};

        if (usersWithPermission == null) {
          usersWithPermission = new HashMap<String, List<String[]>>();
          List<String[]> permissionByGrantor = new ArrayList<String[]>();
          permissionByGrantor.add(grant);
          usersWithPermission.put(user, permissionByGrantor);
          privileges.put(sqlpriv, usersWithPermission);
        } else {
          List<String[]> permissionByGrantor = usersWithPermission.get(user);
          if (permissionByGrantor == null) {
            permissionByGrantor = new ArrayList<String[]>();
            permissionByGrantor.add(grant);
            usersWithPermission.put(user, permissionByGrantor);
          } else {
            permissionByGrantor.add(grant);
          }
        }
      }
    }
  }
621586
@Override
    public void updatePermissions(IPermission[] permissions) throws AuthorizationException {
        if (permissions.length > 0) {
            getPermissionStore().update(permissions);
            if (this.cachePermissions) {
                removeFromPermissionsCache(permissions);
            }
        }
    }
113227
def acp_users_permissions():
    """"""
    if not current_user.is_admin:
        return error("Not authorized to edit users.", 401)
    if not db:
        return error('The ACP is not available in single-user mode.', 500)

    form = PermissionsForm()
    users = []
    uids = db.hgetall('users').values()
    if request.method == 'POST':
        if not form.validate():
            return error("Bad Request", 400)
        for uid in uids:
            user = get_user(uid)
            for perm in PERMISSIONS:
                if '{0}.{1}'.format(uid, perm) in request.form:
                    setattr(user, perm, True)
                else:
                    setattr(user, perm, False)
            if int(uid) == current_user.uid:
                # Some permissions cannot apply to the current user.
                user.is_admin = True
                user.active = True
                user.must_change_password = False
            write_user(user)
            users.append((uid, user))
        action = 'save'
    else:
        action = 'edit'

    def display_permission(user, permission):
        """Display a permission."""
        checked = 'checked' if getattr(user, permission) else ''
        if permission == 'wants_all_posts' and not user.can_edit_all_posts:
            # If this happens, permissions are damaged.
            checked = ''
        if (user.uid == current_user.uid and permission in [
                'active', 'is_admin', 'must_change_password']):
            disabled = 'disabled'
        else:
            disabled = ''
        permission_a = permission
        if permission == 'active':
            permission_a = 'is_active'
        d = ('<input type="checkbox" name="{0}.{1}" data-uid="{0}" '
             'data-perm="{4}" class="u{0}" {2} {3}>')
        return d.format(user.uid, permission, checked, disabled, permission_a)

    if not users:
        users = [(i, get_user(i)) for i in uids]

    return render('coil_users_permissions.tmpl',
                  context={'title': 'Permissions',
                           'USERS': sorted(users),
                           'UIDS': sorted(uids),
                           'PERMISSIONS_E': PERMISSIONS_E,
                           'action': action,
                           'json': json,
                           'form': form,
                           'display_permission': display_permission})
184119
public void updateUser(UserUpdate update) {
		getResourceFactory().getApiResource("/user/")
				.entity(update, MediaType.APPLICATION_JSON_TYPE).put();
	}
784584
def set_collections_acl(self):
        
        acl = [(Allow, 'g:admin', ALL_PERMISSIONS)]
        collections = self.get_collections()
        resources = self.get_resources(collections)
        aces = self._get_least_permissions_aces(resources)
        if aces is not None:
            for ace in aces:
                acl.append(ace)
        acl.append(DENY_ALL)
        self.__acl__ = tuple(acl)
1203678
private void updateEligibility()
    {
        checkState(Thread.holdsLock(root), "Must hold lock to update eligibility");
        synchronized (root) {
            if (!parent.isPresent()) {
                return;
            }
            if (isEligibleToStartNext()) {
                parent.get().addOrUpdateSubGroup(this);
            }
            else {
                parent.get().eligibleSubGroups.remove(this);
                lastStartMillis = 0;
            }
            parent.get().updateEligibility();
        }
    }
1062209
protected function updateUsers()
    {
        $user_id = $this->getAuthUserId();
        if (!($user_id > 0)) {
            return;
        }

        if (!$this->isDirty('updated_by')) {
            $this->updated_by = $user_id;
        }

        if (!$this->exists && !$this->isDirty('created_by')) {
            $this->created_by = $user_id;
        }
    }
736543
public void updateResourcePermissions()
    {
        UserPermission recUserPermission = new UserPermission(this.getOwner().findRecordOwner());
        
        recUserPermission.addListener(new SubFileFilter(this.getOwner()));
        
        try {
            while (recUserPermission.hasNext())
            {
                recUserPermission.next();
                recUserPermission.edit();
                recUserPermission.getField(UserPermission.USER_RESOURCE_ID).setModified(true);   // Fake a mod, so the group permissions will be updated
                recUserPermission.set();
            }
        } catch (DBException ex) {
            ex.printStackTrace();
        }
        
        recUserPermission.free();
    }
846551
public void setACL(ACL acl){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.SetACL);

        SetACLProtocol p = new SetACLProtocol(acl);

        connection.submitRequest(header, p, null);
    }
973259
def update_current_user(self, **params):
        """"""
        response = self._put('v2', 'user', data=params)
        return self._make_api_object(response, CurrentUser)