From d245b29f82a03f1aff966a2fb2100a5703d82f32 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 25 Jan 2017 09:32:42 -0500 Subject: More app code migration (#5170) * Migrate admin functions into app package * More user function refactoring * Move post functions into app package --- model/user.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'model') diff --git a/model/user.go b/model/user.go index 76c3772cb..876ba70e7 100644 --- a/model/user.go +++ b/model/user.go @@ -376,6 +376,13 @@ func IsInRole(userRoles string, inRole string) bool { return false } +func (u *User) IsSSOUser() bool { + if u.AuthService != "" && u.AuthService != USER_AUTH_SERVICE_EMAIL { + return true + } + return false +} + func (u *User) IsOAuthUser() bool { if u.AuthService == USER_AUTH_SERVICE_GITLAB { return true -- cgit v1.2.3-1-g7c22