fix: apply gofumpt formatting and clean up comments

Signed-off-by: SBALAVIGNESH123 <balavignesh449@gmail.com>
pull/36113/head
SBALAVIGNESH123 2025-12-10 23:59:54 +07:00
parent a498e10075
commit 349a1a7474
4 changed files with 5 additions and 7 deletions

@ -4,9 +4,10 @@
package actions
import (
"context"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/timeutil"
"context"
)
// PermissionMode represents the permission configuration mode

@ -4,9 +4,10 @@
package actions
import (
"context"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/timeutil"
"context"
)
// ActionCrossRepoAccess represents cross-repository access rules

@ -31,9 +31,6 @@ func GetActionsPermissions(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
// Organization settings are more sensitive than repo settings because they
// affect ALL repositories in the org. We should be extra careful here.
// Only org owners should be able to modify these settings.
// Organization settings are more sensitive than repo settings because they
// affect ALL repositories in the org. We should be extra careful here.
// Only org owners should be able to modify these settings.

@ -37,10 +37,9 @@ func GetActionsPermissions(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
// Check if user has admin access to this repo
// NOTE: Only repo admins should be able to view/modify permission settings
// NOTE: Only repo admins and owners should be able to view/modify permission settings
// This is important for security - we don't want regular contributors
// to be able to grant themselves elevated permissions via Actions
// Only repo admins and owners should be able to view/modify permission settings
// This is enforced by the reqAdmin middleware.
perms, err := actions_model.GetRepoActionPermissions(ctx, ctx.Repo.Repository.ID)