summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-04-03 18:13:28 +0100
committerHarrison Healey <harrisonmhealey@gmail.com>2017-04-03 13:13:28 -0400
commite49f5928c55ba57c39efa11c568c66342b962aae (patch)
treec3199ea07e1c17aebdd77d53ad1397b469a0f963 /model
parent232a99f0c7b9364cb4386264f9ff7f97549a4378 (diff)
downloadchat-e49f5928c55ba57c39efa11c568c66342b962aae.tar.gz
chat-e49f5928c55ba57c39efa11c568c66342b962aae.tar.bz2
chat-e49f5928c55ba57c39efa11c568c66342b962aae.zip
PLT-6139 (Server): Private Channel member managing (#5941)
Adds an EE policy feature to allow restricting system-wide which level of Admins can manage the membership of private channels.
Diffstat (limited to 'model')
-rw-r--r--model/authorization.go1
-rw-r--r--model/config.go46
2 files changed, 26 insertions, 21 deletions
diff --git a/model/authorization.go b/model/authorization.go
index 1f6f34a2a..b27fcaf77 100644
--- a/model/authorization.go
+++ b/model/authorization.go
@@ -305,7 +305,6 @@ func InitalizeRoles() {
[]string{
PERMISSION_READ_CHANNEL.Id,
PERMISSION_MANAGE_PUBLIC_CHANNEL_MEMBERS.Id,
- PERMISSION_MANAGE_PRIVATE_CHANNEL_MEMBERS.Id,
PERMISSION_UPLOAD_FILE.Id,
PERMISSION_GET_PUBLIC_LINK.Id,
PERMISSION_CREATE_POST.Id,
diff --git a/model/config.go b/model/config.go
index e26bf90f1..ebd26d85d 100644
--- a/model/config.go
+++ b/model/config.go
@@ -280,26 +280,27 @@ type SupportSettings struct {
}
type TeamSettings struct {
- SiteName string
- MaxUsersPerTeam int
- EnableTeamCreation bool
- EnableUserCreation bool
- EnableOpenServer *bool
- RestrictCreationToDomains string
- EnableCustomBrand *bool
- CustomBrandText *string
- CustomDescriptionText *string
- RestrictDirectMessage *string
- RestrictTeamInvite *string
- RestrictPublicChannelManagement *string
- RestrictPrivateChannelManagement *string
- RestrictPublicChannelCreation *string
- RestrictPrivateChannelCreation *string
- RestrictPublicChannelDeletion *string
- RestrictPrivateChannelDeletion *string
- UserStatusAwayTimeout *int64
- MaxChannelsPerTeam *int64
- MaxNotificationsPerChannel *int64
+ SiteName string
+ MaxUsersPerTeam int
+ EnableTeamCreation bool
+ EnableUserCreation bool
+ EnableOpenServer *bool
+ RestrictCreationToDomains string
+ EnableCustomBrand *bool
+ CustomBrandText *string
+ CustomDescriptionText *string
+ RestrictDirectMessage *string
+ RestrictTeamInvite *string
+ RestrictPublicChannelManagement *string
+ RestrictPrivateChannelManagement *string
+ RestrictPublicChannelCreation *string
+ RestrictPrivateChannelCreation *string
+ RestrictPublicChannelDeletion *string
+ RestrictPrivateChannelDeletion *string
+ RestrictPrivateChannelManageMembers *string
+ UserStatusAwayTimeout *int64
+ MaxChannelsPerTeam *int64
+ MaxNotificationsPerChannel *int64
}
type LdapSettings struct {
@@ -621,6 +622,11 @@ func (o *Config) SetDefaults() {
*o.TeamSettings.RestrictPrivateChannelDeletion = *o.TeamSettings.RestrictPrivateChannelManagement
}
+ if o.TeamSettings.RestrictPrivateChannelManageMembers == nil {
+ o.TeamSettings.RestrictPrivateChannelManageMembers = new(string)
+ *o.TeamSettings.RestrictPrivateChannelManageMembers = PERMISSIONS_ALL
+ }
+
if o.TeamSettings.UserStatusAwayTimeout == nil {
o.TeamSettings.UserStatusAwayTimeout = new(int64)
*o.TeamSettings.UserStatusAwayTimeout = TEAM_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT