mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-10 04:56:59 +01:00
fixes
This commit is contained in:
parent
87d9f86391
commit
01a328bed0
@ -273,6 +273,10 @@ func GetActionsUserRepoPermission(ctx context.Context, repo *repo_model.Reposito
|
||||
return perm, err
|
||||
}
|
||||
|
||||
if err := repo.LoadOwner(ctx); err != nil {
|
||||
return perm, err
|
||||
}
|
||||
|
||||
actionsUnit, err := repo.GetUnit(ctx, unit.TypeActions)
|
||||
if err != nil {
|
||||
// If Actions unit doesn't exist, return empty permission
|
||||
|
||||
@ -280,6 +280,7 @@ func TestActionsTokenPermissionsClamping(t *testing.T) {
|
||||
|
||||
// Set Clamping Config: Custom Mode (Default=Max), Max Code = Read
|
||||
req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings/actions/general/token_permissions", repo.OwnerName, repo.Name), map[string]string{
|
||||
"override_org_config": "true",
|
||||
"token_permission_mode": "custom",
|
||||
"max_code": "read",
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user