Skip to content

Commit 349a1a7

Browse files
fix: apply gofumpt formatting and clean up comments
Signed-off-by: SBALAVIGNESH123 <[email protected]>
1 parent a498e10 commit 349a1a7

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

models/actions/action_permissions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
package actions
55

66
import (
7+
"context"
8+
79
"code.gitea.io/gitea/models/db"
810
"code.gitea.io/gitea/modules/timeutil"
9-
"context"
1011
)
1112

1213
// PermissionMode represents the permission configuration mode

models/actions/cross_repo_access.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
package actions
55

66
import (
7+
"context"
8+
79
"code.gitea.io/gitea/models/db"
810
"code.gitea.io/gitea/modules/timeutil"
9-
"context"
1011
)
1112

1213
// ActionCrossRepoAccess represents cross-repository access rules

routers/api/v1/org/org_actions_permissions.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ func GetActionsPermissions(ctx *context.APIContext) {
3131
// "404":
3232
// "$ref": "#/responses/notFound"
3333

34-
// Organization settings are more sensitive than repo settings because they
35-
// affect ALL repositories in the org. We should be extra careful here.
36-
// Only org owners should be able to modify these settings.
3734
// Organization settings are more sensitive than repo settings because they
3835
// affect ALL repositories in the org. We should be extra careful here.
3936
// Only org owners should be able to modify these settings.

routers/api/v1/repo/repo_actions_permissions.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ func GetActionsPermissions(ctx *context.APIContext) {
3737
// "$ref": "#/responses/notFound"
3838

3939
// Check if user has admin access to this repo
40-
// NOTE: Only repo admins should be able to view/modify permission settings
40+
// NOTE: Only repo admins and owners should be able to view/modify permission settings
4141
// This is important for security - we don't want regular contributors
4242
// to be able to grant themselves elevated permissions via Actions
43-
// Only repo admins and owners should be able to view/modify permission settings
4443
// This is enforced by the reqAdmin middleware.
4544

4645
perms, err := actions_model.GetRepoActionPermissions(ctx, ctx.Repo.Repository.ID)

0 commit comments

Comments
 (0)