mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	fix(api): deactivate issue api for disabled or external issue-tracker (#8829)
- When the issue unit is disabled for a repository, don't allow issue related APIs. - Added integration tests. - Resolves #8408 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8829 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: zokki <zokki.softwareschmiede@gmail.com> Co-committed-by: zokki <zokki.softwareschmiede@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								8f4ebab023
							
						
					
				
			
			
				commit
				
					
						4247c37300
					
				
			
		
					 7 changed files with 252 additions and 75 deletions
				
			
		|  | @ -36,8 +36,8 @@ func TestBadges(t *testing.T) { | |||
| 			owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) | ||||
| 
 | ||||
| 			repo, _, f := tests.CreateDeclarativeRepo(t, owner, "", | ||||
| 				[]unit_model.Type{unit_model.TypeActions}, | ||||
| 				[]unit_model.Type{unit_model.TypeIssues, unit_model.TypePullRequests, unit_model.TypeReleases}, | ||||
| 				[]unit_model.Type{unit_model.TypeActions, unit_model.TypeReleases}, | ||||
| 				[]unit_model.Type{unit_model.TypeIssues, unit_model.TypePullRequests}, | ||||
| 				[]*files_service.ChangeRepoFile{ | ||||
| 					{ | ||||
| 						Operation:     "create", | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue