mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-25 05:33:05 +02:00
Add UnitCommitStatus
This commit is contained in:
@@ -33,6 +33,7 @@ const (
|
||||
TypeProjects // 8 Projects
|
||||
TypePackages // 9 Packages
|
||||
TypeActions // 10 Actions
|
||||
TypeCommitStatus // 11 Commit Status
|
||||
|
||||
// FIXME: TEAM-UNIT-PERMISSION: the team unit "admin" permission's design is not right, when a new unit is added in the future,
|
||||
// admin team won't inherit the correct admin permission for the new unit, need to have a complete fix before adding any new unit.
|
||||
@@ -65,6 +66,7 @@ var (
|
||||
TypeProjects,
|
||||
TypePackages,
|
||||
TypeActions,
|
||||
TypeCommitStatus,
|
||||
}
|
||||
|
||||
// DefaultRepoUnits contains the default unit types
|
||||
@@ -77,8 +79,10 @@ var (
|
||||
TypeProjects,
|
||||
TypePackages,
|
||||
TypeActions,
|
||||
TypeCommitStatus,
|
||||
}
|
||||
|
||||
// TODO(not7cd): Defaults that need TypeCommitStatus
|
||||
// ForkRepoUnits contains the default unit types for forks
|
||||
DefaultForkRepoUnits = []Type{
|
||||
TypeCode,
|
||||
@@ -237,6 +241,7 @@ func (u Unit) MaxPerm() perm.AccessMode {
|
||||
}
|
||||
|
||||
// Enumerate all the units
|
||||
// TODO(not7cd): Add TypeCommitStatus
|
||||
var (
|
||||
UnitCode = Unit{
|
||||
TypeCode,
|
||||
@@ -328,6 +333,16 @@ var (
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
||||
// TODO(not7cd): Just copied this
|
||||
UnitCommitStatus = Unit{
|
||||
TypeCommitStatus,
|
||||
"repo.commitstatus",
|
||||
"/statuses",
|
||||
"commitstatus.unit.desc",
|
||||
8,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
||||
// Units contains all the units
|
||||
Units = map[Type]Unit{
|
||||
TypeCode: UnitCode,
|
||||
@@ -340,6 +355,7 @@ var (
|
||||
TypeProjects: UnitProjects,
|
||||
TypePackages: UnitPackages,
|
||||
TypeActions: UnitActions,
|
||||
TypeCommitStatus: UnitCommitStatus,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user