summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-06 10:17:04 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-06 10:17:04 -0500
commit51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f (patch)
treea8d77ba7c6fedbbe63bb8b0da88f19177f44ac51 /model
parent93a684ca1b0030d2c13fb8e157b9db7c0541f513 (diff)
parent7eca077877787b0cd9eb7764f46e9eba78fb7382 (diff)
downloadchat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.tar.gz
chat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.tar.bz2
chat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.zip
Merge pull request #1332 from mattermost/plt-560
PLT-560 Prevent SSO users from changing their email
Diffstat (limited to 'model')
-rw-r--r--model/user.go7
1 files changed, 7 insertions, 0 deletions
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 = ""