Repository navigation
feat: jh registry permission list, set and delete commands
#28
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
30534be
registry add, update and config commands
thelonewolf1603 dae25ae
updated add update help section
thelonewolf1603 ae1bfe3
registry list cmd in one line, changed add and update to config add a…
thelonewolf1603 bd17d1f
updated print messages for add and update registry
thelonewolf1603 a1290ed
added registry permission list, set and delete commands
thelonewolf1603 9076a9d
separate commands for admin user and group list and public user and g…
thelonewolf1603 9b3b24a
updated helptext
thelonewolf1603 1c9ff8e
resolved conflicts
thelonewolf1603 8e0d11e
resolved conflicts
thelonewolf1603 641b835
resolved conflicts
thelonewolf1603 beaca90
removed incorrect json
thelonewolf1603 4ebd108
removed incorrect json
thelonewolf1603 d0eba81
removed redendancies
thelonewolf1603 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,12 @@ A command-line interface for interacting with JuliaHub, a platform for Julia com | |
|
|
||
| - **Authentication**: OAuth2 device flow authentication with JWT token handling | ||
| - **Dataset Management**: List, download, upload, and check status of datasets | ||
| - **Registry Management**: List and manage Julia package registries | ||
| - **Registry Management**: List, add, and update Julia package registries | ||
| - **Project Management**: List and filter projects using GraphQL API | ||
| - **Git Integration**: Clone, push, fetch, and pull with automatic JuliaHub authentication | ||
| - **Julia Integration**: Install Julia and run with JuliaHub package server configuration | ||
| - **User Management**: Display user information and view profile details | ||
| - **Administrative Commands**: Manage users, tokens, and system resources (requires admin permissions) | ||
| - **User Management**: Display user information, list users and groups | ||
| - **Administrative Commands**: Manage users, groups, tokens, and system resources (requires admin permissions) | ||
|
|
||
| ## Installation | ||
|
|
||
|
|
@@ -155,6 +155,12 @@ go build -o jh . | |
| - `jh registry list` - List all package registries on JuliaHub | ||
| - Default: Shows only UUID and Name | ||
| - `jh registry list --verbose` - Show detailed registry information including owner, creation date, package count, and description | ||
| - `jh registry config <name>` - Show the full JSON configuration for a registry | ||
| - `jh registry config add` - Add a new registry (JSON payload via stdin or `--file`) | ||
| - `jh registry config update` - Update an existing registry (same JSON schema as add, same flags) | ||
| - `jh registry permission list <registry>` - List permissions for a registry | ||
| - `jh registry permission set <registry> --user|--group <name> --privilege download|register` - Add or update a permission | ||
| - `jh registry permission remove <registry> --user|--group <name>` - Remove a permission | ||
|
|
||
| ### Project Management (`jh project`) | ||
|
|
||
|
|
@@ -182,15 +188,23 @@ go build -o jh . | |
|
|
||
| ### User Information (`jh user`) | ||
|
|
||
| - `jh user info` - Show detailed user information | ||
| - `jh user info` - Show detailed information about the logged-in user | ||
| - `jh user list` - List all users (`<name> (<username>)` format, via GraphQL) | ||
|
|
||
| ### Group Information (`jh group`) | ||
|
|
||
| - `jh group list` - List all groups (one per line, via GraphQL) | ||
|
|
||
| ### Administrative Commands (`jh admin`) | ||
|
|
||
| #### User Management | ||
| - `jh admin user list` - List all users (requires appropriate permissions) | ||
| - Default: Shows only Name and Email | ||
| - Default: Shows `<name> (<email>)` per line | ||
| - `jh admin user list --verbose` - Show detailed user information including UUID, groups, and features | ||
|
|
||
| #### Group Management | ||
| - `jh admin group list` - List all groups via REST API (requires appropriate permissions) | ||
|
|
||
| #### Token Management | ||
| - `jh admin token list` - List all tokens (requires appropriate permissions) | ||
| - Default: Shows only Subject, Created By, and Expired status | ||
|
|
@@ -245,6 +259,32 @@ jh registry list --verbose | |
|
|
||
| # List registries on custom server | ||
| jh registry list -s yourinstall | ||
|
|
||
| # Show full configuration for a registry | ||
| jh registry config JuliaSimRegistry | ||
| jh registry config JuliaSimRegistry -s nightly.juliahub.dev | ||
|
|
||
| # Add a registry (JSON via stdin or --file) | ||
| echo '{ | ||
| "name": "MyRegistry", | ||
| "license_detect": true, | ||
| "artifact": {"download": true}, | ||
| "docs": {"download": true, "docgen_check_installable": false, "html_size_threshold_bytes": null}, | ||
| "metadata": {"download": true}, | ||
| "pkg": {"download": true, "static_analysis_runs": []}, | ||
| "enabled": true, "display_apps": true, "owner": "", "sync_schedule": null, | ||
| "download_providers": [{ | ||
| "type": "cacheserver", "host": "https://pkg.juliahub.com", | ||
| "credential_key": "JC Auth Token", | ||
| "server_type": "", "github_credential_type": "", "api_host": "", "url": "", "user_name": "" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a duplicate key here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed |
||
| }] | ||
| }' | jh registry config add | ||
|
|
||
| # Or use a file | ||
| jh registry config add --file registry.json | ||
|
|
||
| # Update an existing registry (same JSON schema, registry identified by "name" field) | ||
| jh registry config update --file registry.json | ||
| ``` | ||
|
|
||
| ### Project Operations | ||
|
|
@@ -260,6 +300,16 @@ jh project list --user | |
| jh project list --user alice | ||
| ``` | ||
|
|
||
| ### User and Group Operations | ||
|
|
||
| ```bash | ||
| # List users (GraphQL) | ||
| jh user list | ||
|
|
||
| # List groups (GraphQL) | ||
| jh group list | ||
| ``` | ||
|
|
||
| ### Administrative Operations | ||
|
|
||
| ```bash | ||
|
|
@@ -269,6 +319,9 @@ jh admin user list | |
| # List users with detailed information | ||
| jh admin user list --verbose | ||
|
|
||
| # List all groups via REST (requires admin permissions) | ||
| jh admin group list | ||
|
|
||
| # List all tokens (requires admin permissions) | ||
| jh admin token list | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| query Groups($name: String = "%", $limit: Int = 100) { | ||
| groups(where: { name: { _ilike: $name } }, limit: $limit) { | ||
| name | ||
| group_id | ||
| } | ||
| products { | ||
| name | ||
| display_name | ||
| id | ||
| compute_type_name | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these changes part of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, checked out from the registry config pr, will undo after that is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed