Adapt the news to the admin role
This commit is contained in:
parent
5d522da0d2
commit
272719a67a
1 changed files with 2 additions and 2 deletions
4
news.go
4
news.go
|
@ -23,7 +23,7 @@ func newsHandler(w http.ResponseWriter, r *http.Request, sess *Session) {
|
|||
}
|
||||
|
||||
func editNewsHandler(w http.ResponseWriter, r *http.Request, sess *Session) {
|
||||
if sess.User == "" {
|
||||
if !sess.IsAdmin() {
|
||||
notFound(w, r)
|
||||
return
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ func editNewsHandler(w http.ResponseWriter, r *http.Request, sess *Session) {
|
|||
}
|
||||
|
||||
func postNewsHandler(w http.ResponseWriter, r *http.Request, sess *Session) {
|
||||
if sess.User == "" {
|
||||
if !sess.IsAdmin() {
|
||||
notFound(w, r)
|
||||
return
|
||||
}
|
||||
|
|
Reference in a new issue