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

Read permission dependency #1209

Open
lmarini opened this issue Nov 7, 2024 · 0 comments
Open

Read permission dependency #1209

lmarini opened this issue Nov 7, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@lmarini
Copy link
Member

lmarini commented Nov 7, 2024

Make a new dependency that checks all relevant permissions to see if a user can see a dataset or not.

    authenticated: bool = Depends(CheckStatus("AUTHENTICATED")),
    public: bool = Depends(CheckStatus("PUBLIC")),
    admin=Depends(get_admin),
    admin_mode: bool = Depends(get_admin_mode),
    viewer: bool = Depends(Authorization("viewer")),
    
    if authenticated or public or (admin and admin_mode) or viewer:
@lmarini lmarini added the enhancement New feature or request label Nov 7, 2024
@lmarini lmarini added this to the v2.0-beta-4 milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant