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