Skip to content

Commit

Permalink
Updates roles
Browse files Browse the repository at this point in the history
  • Loading branch information
moonso committed Apr 6, 2021
1 parent 62df0cd commit 8f6f7b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NIPTool/commands/load_commands.py
Expand Up @@ -52,7 +52,7 @@ def load_batch(
@load_commands.command(name="user")
@click.option("--email", required=True)
@click.option("--user-name", required=True)
@click.option("--role", type=click.Choice(["RW"]), default="RW", show_default=True)
@click.option("--role", type=click.Choice(["RW", "R"]), default="RW", show_default=True)
@click.pass_obj
def load_user(context: dict, email: str, user_name: str, role: str):
"""Add a user to the database"""
Expand Down
3 changes: 2 additions & 1 deletion NIPTool/models/server/load.py
@@ -1,6 +1,7 @@
from typing import Optional

from pydantic import BaseModel, EmailStr
from typing_extensions import Literal


class BatchRequestBody(BaseModel):
Expand All @@ -12,4 +13,4 @@ class BatchRequestBody(BaseModel):
class UserRequestBody(BaseModel):
email: EmailStr
username: str
role: str
role: Literal["R", "RW"]

0 comments on commit 8f6f7b3

Please sign in to comment.