mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Ensure DeleteUser is not allowed to Delete Orgs and visa versa (#10134)
* add check to DeleteUser * add check to DeleteOrganization * add Test * remove redundancy (deleteOrg is only used in DeleteOrganization) * Update models/org.go Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -199,6 +199,9 @@ func TestDeleteUser(t *testing.T) {
 | 
			
		||||
	test(4)
 | 
			
		||||
	test(8)
 | 
			
		||||
	test(11)
 | 
			
		||||
 | 
			
		||||
	org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User)
 | 
			
		||||
	assert.Error(t, DeleteUser(org))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestEmailNotificationPreferences(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user