Class: SlackWebApi::AdminConversationsRestrictAccessController
- Inherits:
-
BaseController
- Object
- BaseController
- SlackWebApi::AdminConversationsRestrictAccessController
- Defined in:
- lib/slack_web_api/controllers/admin_conversations_restrict_access_controller.rb
Overview
AdminConversationsRestrictAccessController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#admin_conversations_restrict_access_add_group(token, group_id, channel_id, team_id: nil) ⇒ ApiResponse
Add an allowlist of IDP groups for accessing a channel scope:
admin.conversations:writeGroup](slack.com/help/articles/115001435788-Connect-identity-provi der-groups-to-your-Enterprise-Grid-org) ID to be an allowlist for the private channel. -
#admin_conversations_restrict_access_list_groups(token, channel_id, team_id: nil) ⇒ ApiResponse
List all IDP Groups linked to a channel scope:
admin.conversations:readhere channel exists. -
#admin_conversations_restrict_access_remove_group(token, team_id, group_id, channel_id) ⇒ ApiResponse
Remove a linked IDP group linked from a private channel scope:
admin.conversations:writechannel exists.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from SlackWebApi::BaseController
Instance Method Details
#admin_conversations_restrict_access_add_group(token, group_id, channel_id, team_id: nil) ⇒ ApiResponse
Add an allowlist of IDP groups for accessing a channel scope: admin.conversations:write Group](slack.com/help/articles/115001435788-Connect-identity-provi der-groups-to-your-Enterprise-Grid-org) ID to be an allowlist for the private channel. group to. channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/slack_web_api/controllers/admin_conversations_restrict_access_controller.rb', line 23 def admin_conversations_restrict_access_add_group(token, group_id, channel_id, team_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/admin.conversations.restrictAccess.addGroup', Server::DEFAULT) .form_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(group_id, key: 'group_id') .is_required(true)) .form_param(new_parameter(channel_id, key: 'channel_id') .is_required(true)) .form_param(new_parameter(team_id, key: 'team_id')) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('slackAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |
#admin_conversations_restrict_access_list_groups(token, channel_id, team_id: nil) ⇒ ApiResponse
List all IDP Groups linked to a channel scope: admin.conversations:read here channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/slack_web_api/controllers/admin_conversations_restrict_access_controller.rb', line 61 def admin_conversations_restrict_access_list_groups(token, channel_id, team_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/admin.conversations.restrictAccess.listGroups', Server::DEFAULT) .query_param(new_parameter(token, key: 'token') .is_required(true)) .query_param(new_parameter(channel_id, key: 'channel_id') .is_required(true)) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'Content-Type')) .query_param(new_parameter(team_id, key: 'team_id')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('slackAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |
#admin_conversations_restrict_access_remove_group(token, team_id, group_id, channel_id) ⇒ ApiResponse
Remove a linked IDP group linked from a private channel scope: admin.conversations:write channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization. Group](slack.com/help/articles/115001435788-Connect-identity-provi der-groups-to-your-Enterprise-Grid-org) ID to remove from the private channel. linked group from.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/slack_web_api/controllers/admin_conversations_restrict_access_controller.rb', line 100 def admin_conversations_restrict_access_remove_group(token, team_id, group_id, channel_id) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/admin.conversations.restrictAccess.removeGroup', Server::DEFAULT) .form_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(team_id, key: 'team_id') .is_required(true)) .form_param(new_parameter(group_id, key: 'group_id') .is_required(true)) .form_param(new_parameter(channel_id, key: 'channel_id') .is_required(true)) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('slackAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |