Skip to content

Commit

Permalink
Merge pull request #2405 from vrk-kpa/AV-2320_add-all-users-to-new-gr…
Browse files Browse the repository at this point in the history
…oups

AV-2320: Fix opendata-group add CLI command
  • Loading branch information
bzar authored Sep 30, 2024
2 parents d6076b8 + ee13bf0 commit e71c91c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,11 @@ def opendata_group():
@click.option('--dryrun', is_flag=True)
@click.pass_context
def add_to_groups(ctx, dryrun):
context = {'ignore_auth': True}
site_user = get_action(u'get_site_user')({
u'ignore_auth': True},
{}
)
context = {'user': site_user['name'], 'ignore_auth': True}
groups = get_action('group_list')(context, {})
users = get_action('user_list')(context, {})

Expand Down

0 comments on commit e71c91c

Please sign in to comment.