Skip to content

Conversation

robert-norberg
Copy link

Adds a hook so that the currently logged in user object can be accessed in any callback by e.g.

@app.callback(Output(...), Input(...))
def some_callback_function(input1):
    ...
    current_user = dash.callback_context.custom_data.get("user")
    if "admin" in current_user.get("groups", []):
        ...
    else:
        ...

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.

1 participant