mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	admin should be able to delete repos even if he is not a member of the organization (#5443)
This commit is contained in:
		
					parent
					
						
							
								bc42b3ab6c
							
						
					
				
			
			
				commit
				
					
						9441bfaccc
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -502,7 +502,7 @@ func Delete(ctx *context.APIContext) {
 | 
			
		|||
	owner := ctx.Repo.Owner
 | 
			
		||||
	repo := ctx.Repo.Repository
 | 
			
		||||
 | 
			
		||||
	if owner.IsOrganization() {
 | 
			
		||||
	if owner.IsOrganization() && !ctx.User.IsAdmin {
 | 
			
		||||
		isOwner, err := owner.IsOwnedBy(ctx.User.ID)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			ctx.Error(500, "IsOwnedBy", err)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue