From 7eca077877787b0cd9eb7764f46e9eba78fb7382 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 6 Nov 2015 08:56:13 -0500 Subject: Prevent SSO users from changing their email --- model/user.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'model/user.go') diff --git a/model/user.go b/model/user.go index 871d1bf2d..4365f47d2 100644 --- a/model/user.go +++ b/model/user.go @@ -326,6 +326,13 @@ func IsInRole(userRoles string, inRole string) bool { return false } +func (u *User) IsSSOUser() bool { + if len(u.AuthData) != 0 && len(u.AuthService) != 0 { + return true + } + return false +} + func (u *User) PreExport() { u.Password = "" u.AuthData = "" -- cgit v1.2.3-1-g7c22