diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-11-06 08:56:13 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-11-06 08:56:13 -0500 |
commit | 7eca077877787b0cd9eb7764f46e9eba78fb7382 (patch) | |
tree | 0a335cccc4d8dc9fcaf18903ac56877c6886f9f1 /model/user.go | |
parent | 6417d4728dc9351d5bf3180e458be8ce6e1e642f (diff) | |
download | chat-7eca077877787b0cd9eb7764f46e9eba78fb7382.tar.gz chat-7eca077877787b0cd9eb7764f46e9eba78fb7382.tar.bz2 chat-7eca077877787b0cd9eb7764f46e9eba78fb7382.zip |
Prevent SSO users from changing their email
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 7 |
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 = "" |