summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-10 18:32:22 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-10 18:32:22 -0700
commite06e292be71ca699d90bafbd635118aa47c2d7a5 (patch)
tree3f8f7ce86a1618f625e71084041746745139ba0c /web/web.go
parent41439eb801c6c8c0a55bcada3eeba3b4a561c663 (diff)
downloadchat-e06e292be71ca699d90bafbd635118aa47c2d7a5.tar.gz
chat-e06e292be71ca699d90bafbd635118aa47c2d7a5.tar.bz2
chat-e06e292be71ca699d90bafbd635118aa47c2d7a5.zip
PLT-12 adding log viewer
Diffstat (limited to 'web/web.go')
-rw-r--r--web/web.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/web/web.go b/web/web.go
index 9cb81226b..1ed055a62 100644
--- a/web/web.go
+++ b/web/web.go
@@ -643,12 +643,10 @@ func loginCompleteOAuth(c *api.Context, w http.ResponseWriter, r *http.Request)
func adminConsole(c *api.Context, w http.ResponseWriter, r *http.Request) {
- if !c.IsSystemAdmin() {
- c.Err = model.NewAppError("adminConsole", "You do not have permission to access the admin console.", "")
- c.Err.StatusCode = http.StatusForbidden
+ if !c.HasSystemAdminPermissions("adminConsole") {
return
- } else {
- page := NewHtmlTemplatePage("admin_console", "Admin Console")
- page.Render(c, w)
}
+
+ page := NewHtmlTemplatePage("admin_console", "Admin Console")
+ page.Render(c, w)
}