Add the moderator role
This commit is contained in:
parent
baf2b5a6a9
commit
dcc2d3b9dc
9 changed files with 28 additions and 16 deletions
|
@ -182,7 +182,7 @@ func openReadEpub(h handler) (*epubgo.Epub, database.Book) {
|
|||
return nil, book
|
||||
}
|
||||
if !book.Active {
|
||||
if !h.sess.IsAdmin() {
|
||||
if !h.sess.IsModerator() {
|
||||
return nil, book
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ func openEpubFile(h handler, id string, file string) error {
|
|||
return err
|
||||
}
|
||||
if !book.Active {
|
||||
if !h.sess.IsAdmin() {
|
||||
if !h.sess.IsModerator() {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue