Sha256: a223c1bc29add168f72bf231feebf151b08352494382267305488065acdc7da5

Contents?: true

Size: 1.87 KB

Versions: 4

Compression:

Stored size: 1.87 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

desc 'Add and remove user groups from conversations. Use admin.conversations.* equivalents instead.'
command 'admin_conversations_whitelist' do |g|
  g.desc 'Add an allowlist of IDP groups for accessing a channel'
  g.long_desc %( Add an allowlist of IDP groups for accessing a channel )
  g.command 'add' do |c|
    c.flag 'channel_id', desc: 'The channel to whitelist a group for.'
    c.flag 'group_id', desc: 'The IDP Group ID to whitelist for the private channel.'
    c.flag 'team_id', desc: 'The workspace where the IDP Group and channel exist.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_conversations_whitelist_add(options))
    end
  end

  g.desc 'List all IDP Groups linked to a channel'
  g.long_desc %( List all IDP Groups linked to a channel )
  g.command 'listGroupsLinkedToChannel' do |c|
    c.flag 'channel_id', desc: '.'
    c.flag 'team_id', desc: 'The workspace where the channele exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_conversations_whitelist_listGroupsLinkedToChannel(options))
    end
  end

  g.desc 'Remove an allowlisted IDP group linked to a private channel'
  g.long_desc %( Remove an allowlisted IDP group linked to a private channel )
  g.command 'remove' do |c|
    c.flag 'channel_id', desc: 'The channel to remove a whitelisted group for.'
    c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel whitelist.'
    c.flag 'team_id', desc: 'The workspace where the IDP Group and channel exist.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_conversations_whitelist_remove(options))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-client-1.1.0 bin/commands/admin_conversations_whitelist.rb
slack-ruby-client-1.0.0 bin/commands/admin_conversations_whitelist.rb
slack-ruby-client-0.17.0 bin/commands/admin_conversations_whitelist.rb
slack-ruby-client-0.16.0 bin/commands/admin_conversations_whitelist.rb