Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
729773e3
Unverified
Commit
729773e3
authored
Jan 22, 2025
by
Antoine Kaufmann
Browse files
symphony/cli: add separate commands for guest token and link
parent
9679b068
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
symphony/cli/simbricks/cli/commands/org.py
symphony/cli/simbricks/cli/commands/org.py
+16
-3
No files found.
symphony/cli/simbricks/cli/commands/org.py
View file @
729773e3
...
...
@@ -37,6 +37,19 @@ async def invite(email: str, first_name: str, last_name: str):
@
app
.
command
()
@
async_cli
()
async
def
guest
(
email
:
str
,
first_name
:
str
,
last_name
:
str
):
"""Invite a new user."""
url
=
await
client_provider
.
org_client
.
create_guest
(
organization
,
email
,
first_name
,
last_name
)
print
(
"Guest login link: {url}"
)
"""Create a new guest user."""
await
client_provider
.
org_client
.
create_guest
(
organization
,
email
,
first_name
,
last_name
)
@
app
.
command
()
@
async_cli
()
async
def
guest_token
(
email
:
str
,
filename
:
str
):
"""Generate token for guest account."""
tok
=
await
client_provider
.
org_client
.
guest_token
(
organization
,
email
)
tok
.
store_token
(
filename
)
@
app
.
command
()
@
async_cli
()
async
def
guest_link
(
email
:
str
,
filename
:
str
):
"""Generate magic login link for guest account."""
link
=
await
client_provider
.
org_client
.
guest_magic_link
(
organization
,
email
)
print
(
link
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment