DELETE /metadata/{projectName}/repos/{repoName}/perm/users/{memberId}

<p>Removes {@link Permission}s for the specified {@code memberId} from the specified {@code repoName}
in the specified {@code projectName}.
505552
@Delete("/metadata/{projectName}/repos/{repoName}/perm/users/{memberId}")
    public CompletableFuture<Revision> removeSpecificUserPermission(@Param("projectName") String projectName,
                                                                    @Param("repoName") String repoName,
                                                                    @Param("memberId") String memberId,
                                                                    Author author) {
        final User member = new User(loginNameNormalizer.apply(urlDecode(memberId)));
        return mds.findPermissions(projectName, repoName, member)
                  .thenCompose(unused -> mds.removePerUserPermission(author, projectName,
                                                                     repoName, member));
    }
909641
def delete_project(project_id,**kwargs):
    
    user_id = kwargs.get('user_id')
    #check_perm(user_id, 'delete_project')
    project = _get_project(project_id)
    project.check_write_permission(user_id)
    db.DBSession.delete(project)
    db.DBSession.flush()

    return 'OK'
294384
private void removeFromPermissionsCache(IPermission[] permissions)
            throws AuthorizationException {
        IAuthorizationPrincipal[] principals = getPrincipalsFromPermissions(permissions);
        removeFromPermissionsCache(principals);
    }
776880
private void removeMemberships(Node userNode, boolean broadcast) throws RepositoryException
   {
      PropertyIterator refUserProps = userNode.getReferences();
      while (refUserProps.hasNext())
      {
         Node refUserNode = refUserProps.nextProperty().getParent();
         refUserNode.remove();
      }
   }
909321
public CompletableFuture<Collection<Permission>> findPermissions(String projectName, String repoName,
                                                                     User user) {
        requireNonNull(user, "user");
        if (user.isAdmin()) {
            return CompletableFuture.completedFuture(PerRolePermissions.ALL_PERMISSION);
        }
        if (user instanceof UserWithToken) {
            return findPermissions(projectName, repoName, ((UserWithToken) user).token().appId());
        } else {
            return findPermissions0(projectName, repoName, user);
        }
    }
1133226
public boolean revokeAllResourcePermissions(String subjectid) {
		if (!StringUtils.isBlank(subjectid) && getResourcePermissions().containsKey(subjectid)) {
			getResourcePermissions().remove(subjectid);
			return true;
		}
		return false;
	}
52169
private void clearMemberData()
   {
      m_reader = null;
      m_eventManager = null;
      m_file = null;
      m_root = null;
      m_resourceMap = null;
      m_projectDir = null;
      m_viewDir = null;
      m_outlineCodeVarData = null;
      m_outlineCodeVarMeta = null;
      m_projectProps = null;
      m_fontBases = null;
      m_taskSubProjects = null;
      m_parentTasks = null;
      m_taskOrder = null;
      m_nullTaskOrder = null;
   }
1164355
def remove(self, cls, originalMemberNameList, classNamingConvention):
        
        self._memberDelegate.remove(cls = cls,
                                    originalMemberNameList = originalMemberNameList,
                                    memberName = self._memberName,
                                    classNamingConvention = classNamingConvention)
837058
public void removePermissions(String identity)
   {
      for (Iterator<AccessControlEntry> iter = accessList.iterator(); iter.hasNext();)
      {
         AccessControlEntry a = iter.next();
         if (a.getIdentity().equals(identity))
            iter.remove();
      }
   }
1184670
public void deletePagsDefinition(IPerson person, IPersonAttributesGroupDefinition pagsDef) {

        // Verify permission
        if (!hasPermission(
                person,
                IPermission.DELETE_GROUP_ACTIVITY,
                pagsDef.getCompositeEntityIdentifierForGroup().getKey())) {
            throw new RuntimeAuthorizationException(
                    person,
                    IPermission.DELETE_GROUP_ACTIVITY,
                    pagsDef.getCompositeEntityIdentifierForGroup().getKey());
        }

        pagsGroupDefDao.deletePersonAttributesGroupDefinition(pagsDef);
    }
196857
public void removeResourcesInProject(CmsUUID projectId, boolean removeSystemLocks) {

        Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator();
        while (itLocks.hasNext()) {
            CmsLock currentLock = itLocks.next();
            if (removeSystemLocks && currentLock.getSystemLock().getProjectId().equals(projectId)) {
                unlockResource(currentLock.getResourceName(), true);
            }
            if (currentLock.getEditionLock().getProjectId().equals(projectId)) {
                unlockResource(currentLock.getResourceName(), false);
            }
        }
    }
386452
@Delete("/projects/{projectName}/repos/{repoName}")
    @RequiresRole(roles = ProjectRole.OWNER)
    public CompletableFuture<Void> removeRepository(ServiceRequestContext ctx,
                                                    @Param("repoName") String repoName,
                                                    Repository repository,
                                                    Author author) {
        if (Project.isReservedRepoName(repoName)) {
            return HttpApiUtil.throwResponse(ctx, HttpStatus.FORBIDDEN,
                                             "A reserved repository cannot be removed.");
        }
        return execute(Command.removeRepository(author, repository.parent().name(), repository.name()))
                .thenCompose(unused -> mds.removeRepo(author, repository.parent().name(), repository.name()))
                .handle(HttpApiUtil::throwUnsafelyIfNonNull);
    }
690386
function removeProjectFromUser(user, project) {
		return userProject.findOneAndUpdate({username: user}, {$pull: {'sharedProjects': { $in: [project]}} }, {
			safe: true,
			w: 'majority'
		}).exec();
	}
87061
public void deleteProjectMember(Integer projectId, Integer userId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + projectId + "/" + GitlabProjectMember.URL + "/" + userId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
384687
@Override
    public void removePermissions(IPermission[] permissions) throws AuthorizationException {
        if (permissions.length > 0) {
            getPermissionStore().delete(permissions);
            if (this.cachePermissions) {
                removeFromPermissionsCache(permissions);
            }
        }
    }
927710
@Override
    public void removeFrameworkProject(final String projectName){
        synchronized (projectCache) {
            removeSubDir(projectName);
            projectCache.remove(projectName);
        }
    }
1051691
@Override
   public synchronized boolean delete()
   {
      if (users != null && users.size() <= 0)
      {
         // make unusable
         users.clear();
         users = null;

         final SpoolFile sf = this;

         PrivilegedAction<Boolean> action = new PrivilegedAction<Boolean>()
         {
            public Boolean run()
            {
               return sf.exists() ? SpoolFile.super.delete() : true;
            }
         };
         return SecurityHelper.doPrivilegedAction(action);

      }

      return false;
   }