@@ -16,7 +16,6 @@ import (
16
16
17
17
"code.gitea.io/gitea/models"
18
18
"code.gitea.io/gitea/models/unit"
19
- unit_model "code.gitea.io/gitea/models/unit"
20
19
"code.gitea.io/gitea/modules/base"
21
20
"code.gitea.io/gitea/modules/context"
22
21
"code.gitea.io/gitea/modules/git"
@@ -383,22 +382,22 @@ func renderEditPage(ctx *context.Context) {
383
382
func WikiPost (ctx * context.Context ) {
384
383
switch ctx .FormString ("action" ) {
385
384
case "_new" :
386
- if ! ctx .Repo .CanWrite (unit_model .TypeWiki ) {
385
+ if ! ctx .Repo .CanWrite (unit .TypeWiki ) {
387
386
ctx .NotFound (ctx .Req .URL .RequestURI (), nil )
388
387
return
389
388
}
390
389
NewWikiPost (ctx )
391
390
return
392
391
case "_delete" :
393
- if ! ctx .Repo .CanWrite (unit_model .TypeWiki ) {
392
+ if ! ctx .Repo .CanWrite (unit .TypeWiki ) {
394
393
ctx .NotFound (ctx .Req .URL .RequestURI (), nil )
395
394
return
396
395
}
397
396
DeleteWikiPagePost (ctx )
398
397
return
399
398
}
400
399
401
- if ! ctx .Repo .CanWrite (unit_model .TypeWiki ) {
400
+ if ! ctx .Repo .CanWrite (unit .TypeWiki ) {
402
401
ctx .NotFound (ctx .Req .URL .RequestURI (), nil )
403
402
return
404
403
}
@@ -424,14 +423,14 @@ func Wiki(ctx *context.Context) {
424
423
WikiRevision (ctx )
425
424
return
426
425
case "_edit" :
427
- if ! ctx .Repo .CanWrite (unit_model .TypeWiki ) {
426
+ if ! ctx .Repo .CanWrite (unit .TypeWiki ) {
428
427
ctx .NotFound (ctx .Req .URL .RequestURI (), nil )
429
428
return
430
429
}
431
430
EditWiki (ctx )
432
431
return
433
432
case "_new" :
434
- if ! ctx .Repo .CanWrite (unit_model .TypeWiki ) {
433
+ if ! ctx .Repo .CanWrite (unit .TypeWiki ) {
435
434
ctx .NotFound (ctx .Req .URL .RequestURI (), nil )
436
435
return
437
436
}
0 commit comments