fixed permissions and style

This commit is contained in:
ston1th 2018-09-17 23:54:55 +02:00
commit 575a41127f
12 changed files with 107 additions and 53 deletions

View file

@ -55,7 +55,7 @@ func WritePerm(username, section string, p *Page) bool {
func writePerm(username string, p *Page) bool {
switch p.Perm {
case Public, Internal:
if p.Owner == "" {
if p.Owner == WikiSection {
return username != ""
}
return username == p.Owner