summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-06-29 14:16:17 -0400
committerGitHub <noreply@github.com>2016-06-29 14:16:17 -0400
commitb97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc (patch)
tree8b0b4438a88c044e63eb3520224bdf6b85b5c74b /model
parent4c9b48da8f54bc9af83c7e987149be316f5c61f7 (diff)
downloadchat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.tar.gz
chat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.tar.bz2
chat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.zip
EE: Add the ability to restrict the user roles that can send team invites (#3442)
Diffstat (limited to 'model')
-rw-r--r--model/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index 51a3b252e..1d9e078b6 100644
--- a/model/config.go
+++ b/model/config.go
@@ -32,6 +32,10 @@ const (
DIRECT_MESSAGE_ANY = "any"
DIRECT_MESSAGE_TEAM = "team"
+ TEAM_INVITE_ALL = "all"
+ TEAM_INVITE_TEAM_ADMIN = "team_admin"
+ TEAM_INVITE_SYSTEM_ADMIN = "system_admin"
+
FAKE_SETTING = "********************************"
RESTRICT_EMOJI_CREATION_ALL = "all"
@@ -174,6 +178,7 @@ type TeamSettings struct {
EnableCustomBrand *bool
CustomBrandText *string
RestrictDirectMessage *string
+ RestrictTeamInvite *string
}
type LdapSettings struct {
@@ -346,6 +351,11 @@ func (o *Config) SetDefaults() {
*o.TeamSettings.RestrictDirectMessage = DIRECT_MESSAGE_ANY
}
+ if o.TeamSettings.RestrictTeamInvite == nil {
+ o.TeamSettings.RestrictTeamInvite = new(string)
+ *o.TeamSettings.RestrictTeamInvite = TEAM_INVITE_ALL
+ }
+
if o.EmailSettings.EnableSignInWithEmail == nil {
o.EmailSettings.EnableSignInWithEmail = new(bool)