mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-19 12:56:10 +02:00
* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user * Fix multi-actions in PR page * Change error message * Fix comment update and delete functionality in PR
This commit is contained in:
1 parent
785ba171f4
commit
13013e90f3
7 files changed
+74
-42
No files matched your search
@@ -614,6 +614,15 @@ func CheckUnit(unitType models.UnitType) macaron.Handler {
|
||||
}
|
||||
}
|
||||
|
||||
// CheckAnyUnit will check whether any of the unit types are enabled
|
||||
func CheckAnyUnit(unitTypes ...models.UnitType) macaron.Handler {
|
||||
return func(ctx *Context) {
|
||||
if !ctx.Repo.Repository.AnyUnitEnabled(unitTypes...) {
|
||||
ctx.Handle(404, "CheckAnyUnit", fmt.Errorf("%s: %v", ctx.Tr("units.error.unit_not_allowed"), unitTypes))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// GitHookService checks if repository Git hooks service has been enabled.
|
||||
func GitHookService() macaron.Handler {
|
||||
return func(ctx *Context) {
|
||||
|
||||
Reference in new issue
Block a user