File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 44package v1_21 //nolint
55
66import (
7- actions_model "code.gitea.io/gitea/models/actions"
8-
97 "xorm.io/xorm"
108)
119
10+ // Permission copied from models.actions.Permission
11+ type Permission int
12+
13+ const (
14+ PermissionUnspecified Permission = iota
15+ PermissionNone
16+ PermissionRead
17+ PermissionWrite
18+ )
19+
20+ // Permissions copied from models.actions.Permissions
21+ type Permissions struct {
22+ Actions Permission `yaml:"actions"`
23+ Checks Permission `yaml:"checks"`
24+ Contents Permission `yaml:"contents"`
25+ Deployments Permission `yaml:"deployments"`
26+ IDToken Permission `yaml:"id-token"`
27+ Issues Permission `yaml:"issues"`
28+ Discussions Permission `yaml:"discussions"`
29+ Packages Permission `yaml:"packages"`
30+ Pages Permission `yaml:"pages"`
31+ PullRequests Permission `yaml:"pull-requests"`
32+ RepositoryProjects Permission `yaml:"repository-projects"`
33+ SecurityEvents Permission `yaml:"security-events"`
34+ Statuses Permission `yaml:"statuses"`
35+ }
36+
1237func AddPermissions (x * xorm.Engine ) error {
1338 type ActionRunJob struct {
14- Permissions actions_model. Permissions `xorm:"JSON TEXT"`
39+ Permissions Permissions `xorm:"JSON TEXT"`
1540 }
1641
1742 return x .Sync (new (ActionRunJob ))
You can’t perform that action at this time.
0 commit comments