File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ // Copyright 2025 The Gitea Authors. All rights reserved.
3+ // SPDX-License-Identifier: MIT
4+
5+ package v1_24 //nolint
6+
7+ import (
8+ "xorm.io/xorm"
9+ )
10+
11+ // Permission copied from models.actions.Permission
12+ type Permission int
13+
14+ const (
15+ PermissionUnspecified Permission = iota
16+ PermissionNone
17+ PermissionRead
18+ PermissionWrite
19+ )
20+
21+ // Permissions copied from models.actions.Permissions
22+ type Permissions struct {
23+ Actions Permission `yaml:"actions"`
24+ Checks Permission `yaml:"checks"`
25+ Contents Permission `yaml:"contents"`
26+ Deployments Permission `yaml:"deployments"`
27+ IDToken Permission `yaml:"id-token"`
28+ Issues Permission `yaml:"issues"`
29+ Discussions Permission `yaml:"discussions"`
30+ Packages Permission `yaml:"packages"`
31+ Pages Permission `yaml:"pages"`
32+ PullRequests Permission `yaml:"pull-requests"`
33+ RepositoryProjects Permission `yaml:"repository-projects"`
34+ SecurityEvents Permission `yaml:"security-events"`
35+ Statuses Permission `yaml:"statuses"`
36+ }
37+
38+ func AddPermissions (x * xorm.Engine ) error {
39+ type ActionRunJob struct {
40+ Permissions Permissions `xorm:"JSON TEXT"`
41+ }
42+
43+ return x .Sync (new (ActionRunJob ))
44+ }
You can’t perform that action at this time.
0 commit comments