From 7d31f3a271d933b8c276602d9fb77fd5d22055de Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 30 Sep 2015 11:30:11 -0400 Subject: Fixing some locations to use the IsTeamAdmin function which properly checks for system admin permissions. --- model/user.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'model') diff --git a/model/user.go b/model/user.go index 5cb774478..d8000a7e2 100644 --- a/model/user.go +++ b/model/user.go @@ -304,10 +304,14 @@ func isValidRole(role string) bool { return false } +// Make sure you acually want to use this function. In context.go there are functions to check permssions +// This function should not be used to check permissions. func (u *User) IsInRole(inRole string) bool { return IsInRole(u.Roles, inRole) } +// Make sure you acually want to use this function. In context.go there are functions to check permssions +// This function should not be used to check permissions. func IsInRole(userRoles string, inRole string) bool { roles := strings.Split(userRoles, " ") -- cgit v1.2.3-1-g7c22