Add feature flag for team syncing
This commit is contained in:
parent
96b9d6b0cd
commit
04225f2d25
7 changed files with 21 additions and 10 deletions
|
@ -108,7 +108,7 @@ def disallow_for_synced_team(except_robots=False):
|
|||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
# Team syncing can only be enabled if we have a federated service.
|
||||
if authentication.federated_service:
|
||||
if features.TEAM_SYNCING and authentication.federated_service:
|
||||
orgname = kwargs['orgname']
|
||||
teamname = kwargs['teamname']
|
||||
if model.team.get_team_sync_information(orgname, teamname):
|
||||
|
@ -208,6 +208,7 @@ class OrganizationTeam(ApiResource):
|
|||
@resource('/v1/organization/<orgname>/team/<teamname>/syncing')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@path_param('teamname', 'The name of the team')
|
||||
@show_if(features.TEAM_SYNCING)
|
||||
class OrganizationTeamSyncing(ApiResource):
|
||||
""" Resource for managing syncing of a team by a backing group. """
|
||||
@require_scope(scopes.ORG_ADMIN)
|
||||
|
@ -290,7 +291,7 @@ class TeamMemberList(ApiResource):
|
|||
'can_edit': edit_permission.can(),
|
||||
}
|
||||
|
||||
if authentication.federated_service:
|
||||
if features.TEAM_SYNCING and authentication.federated_service:
|
||||
if SuperUserPermission().can() and AdministerOrganizationPermission(orgname).can():
|
||||
data['can_sync'] = {
|
||||
'service': authentication.federated_service,
|
||||
|
|
Reference in a new issue