From f0841af393d1d0c48bf27b68fca3be8fde096dd6 Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 16 Jul 2015 14:47:28 -0700 Subject: Check your credentials from session --- api/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index 9f23d71a0..054e42e2e 100644 --- a/api/context.go +++ b/api/context.go @@ -271,7 +271,7 @@ func (c *Context) IsTeamAdmin(userId string) bool { return false } else { user := uresult.Data.(*model.User) - return strings.Contains(user.Roles, model.ROLE_ADMIN) && user.TeamId == c.Session.TeamId + return strings.Contains(c.Session.Roles, model.ROLE_ADMIN) && user.TeamId == c.Session.TeamId } } -- cgit v1.2.3-1-g7c22