Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SERV-460] Determine item access mode from visibility field in CSV #52

Merged
merged 13 commits into from
Jul 7, 2023

Conversation

markmatney
Copy link

@markmatney markmatney commented Jul 5, 2023

The --access-mode flag is now an optional override.

Here's the new help output:

$ ./import-items.py --help
Usage: import-items.py [OPTIONS] HAUTH_BASE_URL INPUT_CSV...

  Import items into Hauth.

  Instructs the Hauth instance at HAUTH_BASE_URL to register the access modes
  of all items in each INPUT_CSV.

  Unless --access-mode is supplied, the access mode of each item is determined
  from the Visibility field of its corresponding INPUT_CSV as follows:

  Visibility      Access mode
  ----------      -----------
  open            OPEN
  ucla            TIERED
  private         TIERED
  sinai           ALL_OR_NOTHING

  Exits with zero status only if all items are imported successfully.

Options:
  -m, --access-mode [OPEN|TIERED|ALL_OR_NOTHING]
                                  The access mode to use for all items in each
                                  INPUT_CSV (instead of the Visibility field
                                  value).
  -k, --api-key TEXT              The API key for accessing the admin API.
                                  [required]
  --help                          Show this message and exit.

@markmatney markmatney requested a review from a team as a code owner July 5, 2023 21:35
@markmatney markmatney self-assigned this Jul 5, 2023
@markmatney markmatney merged commit f220d93 into main Jul 7, 2023
@markmatney markmatney deleted the SERV-460 branch July 7, 2023 17:40
markmatney pushed a commit that referenced this pull request Sep 8, 2023
This should have been included with #52.
markmatney pushed a commit that referenced this pull request Sep 12, 2023
This should have been included with #52.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants