Skip to content
Snippets Groups Projects
Unverified Commit ed1d7e6a authored by Samuel Couillard's avatar Samuel Couillard Committed by GitHub
Browse files

Add ldap and google to provider whitelist for rooms migration (#5315)

parent 6e6d6a2b
No related branches found
No related tags found
No related merge requests found
......@@ -114,9 +114,13 @@ module Api
# shared_users_emails: [ <list of shared users emails> ] }}
# Returns: { data: Array[serializable objects] , errors: Array[String] }
# Does: Creates a Room and its RoomMeetingOptions.
# rubocop:disable Metrics/CyclomaticComplexity
def create_room
room_hash = room_params.to_h
# Re-write LDAP and Google to greenlight
room_hash[:provider] = %w[greenlight ldap google].include?(room_hash[:provider]) ? 'greenlight' : room_hash[:provider]
unless room_hash[:provider] == 'greenlight' || Tenant.exists?(name: room_hash[:provider])
return render_error(status: :bad_request, errors: 'Provider does not exist')
end
......@@ -165,6 +169,7 @@ module Api
render_data status: :created
end
# rubocop:enable Metrics/CyclomaticComplexity
# POST /api/v1/migrations/site_settings.json
# Expects: { settings: { site_settings: { :PrimaryColor, :PrimaryColorLight, :PrimaryColorDark,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment