diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-16 09:51:45 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-16 09:51:45 -0700 |
commit | 0ab490845aed0ce3b58cbffd8ec35be237abda1c (patch) | |
tree | 5310cce7e546f5a03f97245af473b62d382028e8 /utils/authorization.go | |
parent | 32265df8be5d530f5b79284792afb9451464ad3a (diff) | |
download | chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.tar.gz chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.tar.bz2 chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.zip |
PLT-6226 Fixing races with licensing (#7213)
* PLT-6226 Fixing races with licensing
* Fixing build issue
* Fixing licensing issue
* removing commented code
Diffstat (limited to 'utils/authorization.go')
-rw-r--r-- | utils/authorization.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/authorization.go b/utils/authorization.go index 6f01d7820..e0e587d71 100644 --- a/utils/authorization.go +++ b/utils/authorization.go @@ -11,7 +11,7 @@ func SetDefaultRolesBasedOnConfig() { // Reset the roles to default to make this logic easier model.InitalizeRoles() - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPublicChannelCreation { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -33,7 +33,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPublicChannelManagement { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -65,7 +65,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPublicChannelDeletion { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -97,7 +97,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPrivateChannelCreation { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -119,7 +119,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPrivateChannelManagement { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -151,7 +151,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPrivateChannelDeletion { case model.PERMISSIONS_ALL: model.ROLE_TEAM_USER.Permissions = append( @@ -184,7 +184,7 @@ func SetDefaultRolesBasedOnConfig() { } // Restrict permissions for Private Channel Manage Members - if IsLicensed { + if IsLicensed() { switch *Cfg.TeamSettings.RestrictPrivateChannelManageMembers { case model.PERMISSIONS_ALL: model.ROLE_CHANNEL_USER.Permissions = append( @@ -229,7 +229,7 @@ func SetDefaultRolesBasedOnConfig() { } // Grant permissions for inviting and adding users to a team. - if IsLicensed { + if IsLicensed() { if *Cfg.TeamSettings.RestrictTeamInvite == model.PERMISSIONS_TEAM_ADMIN { model.ROLE_TEAM_ADMIN.Permissions = append( model.ROLE_TEAM_ADMIN.Permissions, @@ -251,7 +251,7 @@ func SetDefaultRolesBasedOnConfig() { ) } - if IsLicensed { + if IsLicensed() { switch *Cfg.ServiceSettings.RestrictPostDelete { case model.PERMISSIONS_DELETE_POST_ALL: model.ROLE_CHANNEL_USER.Permissions = append( |