mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 17:24:10 +00:00
Remove unnecessary permissions load (#9796)
Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
f740943df4
commit
dbd89acf98
3 changed files with 4 additions and 20 deletions
|
@ -268,13 +268,8 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
|
|||
|
||||
issues(ctx, milestoneID, util.OptionalBoolNone)
|
||||
|
||||
perm, err := models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserRepoPermission", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["CanWriteIssues"] = perm.CanWriteIssuesOrPulls(false)
|
||||
ctx.Data["CanWritePulls"] = perm.CanWriteIssuesOrPulls(true)
|
||||
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWriteIssuesOrPulls(false)
|
||||
ctx.Data["CanWritePulls"] = ctx.Repo.CanWriteIssuesOrPulls(true)
|
||||
|
||||
ctx.HTML(200, tplMilestoneIssues)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue