|
|
|
@ -27,6 +27,7 @@ const (
|
|
|
|
|
TypeExternalWiki // 6 ExternalWiki
|
|
|
|
|
TypeExternalTracker // 7 ExternalTracker
|
|
|
|
|
TypeProjects // 8 Kanban board
|
|
|
|
|
TypePackages // 9 Packages
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Value returns integer value for unit type
|
|
|
|
@ -52,6 +53,8 @@ func (u Type) String() string {
|
|
|
|
|
return "TypeExternalTracker"
|
|
|
|
|
case TypeProjects:
|
|
|
|
|
return "TypeProjects"
|
|
|
|
|
case TypePackages:
|
|
|
|
|
return "TypePackages"
|
|
|
|
|
}
|
|
|
|
|
return fmt.Sprintf("Unknown Type %d", u)
|
|
|
|
|
}
|
|
|
|
@ -74,6 +77,7 @@ var (
|
|
|
|
|
TypeExternalWiki,
|
|
|
|
|
TypeExternalTracker,
|
|
|
|
|
TypeProjects,
|
|
|
|
|
TypePackages,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DefaultRepoUnits contains the default unit types
|
|
|
|
@ -84,6 +88,7 @@ var (
|
|
|
|
|
TypeReleases,
|
|
|
|
|
TypeWiki,
|
|
|
|
|
TypeProjects,
|
|
|
|
|
TypePackages,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NotAllowedDefaultRepoUnits contains units that can't be default
|
|
|
|
@ -275,6 +280,15 @@ var (
|
|
|
|
|
perm.AccessModeOwner,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UnitPackages = Unit{
|
|
|
|
|
TypePackages,
|
|
|
|
|
"repo.packages",
|
|
|
|
|
"/packages",
|
|
|
|
|
"repo.packages.desc",
|
|
|
|
|
6,
|
|
|
|
|
perm.AccessModeRead,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Units contains all the units
|
|
|
|
|
Units = map[Type]Unit{
|
|
|
|
|
TypeCode: UnitCode,
|
|
|
|
@ -285,6 +299,7 @@ var (
|
|
|
|
|
TypeWiki: UnitWiki,
|
|
|
|
|
TypeExternalWiki: UnitExternalWiki,
|
|
|
|
|
TypeProjects: UnitProjects,
|
|
|
|
|
TypePackages: UnitPackages,
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|