mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 00:20:50 +00:00
Repo permission bug fixes (#513)
This commit is contained in:
parent
ac51caa517
commit
6f4ba6884c
3 changed files with 7 additions and 35 deletions
|
@ -275,6 +275,10 @@ func GetByID(ctx *context.APIContext) {
|
|||
// Delete one repository
|
||||
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
|
||||
func Delete(ctx *context.APIContext) {
|
||||
if !ctx.Repo.IsAdmin() {
|
||||
ctx.Error(403, "", "Must have admin rights")
|
||||
return
|
||||
}
|
||||
owner := ctx.Repo.Owner
|
||||
repo := ctx.Repo.Repository
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue