mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Fix all bugs I found in the code
This commit is contained in:
1 parent
a5163fa5f2
commit
9c5b278622
9 files changed
+127
-106
No files matched your search
@@ -272,7 +272,14 @@ func GetActionsUserRepoPermission(ctx context.Context, repo *repo_model.Reposito
|
||||
return perm, err
|
||||
}
|
||||
|
||||
actionsUnit := repo.MustGetUnit(ctx, unit.TypeActions)
|
||||
actionsUnit, err := repo.GetUnit(ctx, unit.TypeActions)
|
||||
if err != nil {
|
||||
// If Actions unit doesn't exist, return empty permission
|
||||
if repo_model.IsErrUnitTypeNotExist(err) {
|
||||
return perm, nil
|
||||
}
|
||||
return perm, err
|
||||
}
|
||||
actionsCfg := actionsUnit.ActionsConfig()
|
||||
|
||||
if task.RepoID != repo.ID {
|
||||
|
||||
Reference in new issue
Block a user