EE: Add the ability to restrict the user roles that can send team invites (#3442)

Этот коммит содержится в:
Joram Wilander
2016-06-29 14:16:17 -04:00
коммит произвёл GitHub
родитель 4c9b48da8f
Коммит b97b3ae617
16 изменённых файлов: 259 добавлений и 48 удалений

Просмотреть файл

@@ -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)