Skip to content

Commit ba3032b

Browse files
Update models/perm/access/repo_permission.go
Signed-off-by: ChristopherHX <[email protected]>
1 parent 0b541ba commit ba3032b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/perm/access/repo_permission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func finalProcessRepoUnitPermission(user *user_model.User, perm *Permission) {
257257
// GetActionsUserRepoPermission returns the actions user permissions to the repository
258258
func GetActionsUserRepoPermission(ctx context.Context, repo *repo_model.Repository, actionsUser *user_model.User, taskID int64) (perm Permission, err error) {
259259
if actionsUser.ID != user_model.ActionsUserID {
260-
setting.PanicInDevOrTesting("GetActionsUserRepoPermission can only be called by the actions user")
260+
return perm, fmt.Errorf("api GetActionsUserRepoPermission can only be called by the actions user")
261261
}
262262
task, err := actions_model.GetTaskByID(ctx, taskID)
263263
if err != nil {

0 commit comments

Comments
 (0)