Open celia-lm opened 2 weeks ago
Workaround?
import dash_enterprise_auth as auth
class DevAuth:
def __init__(self, test_users, active_user):
self.test_users = test_users
self.active_user = active_user
def get_user_data(self):
return self.test_users.get(self.active_user)
def get_username(self):
return self.active_user
DEV = False
if DEV:
# you can also create another condition
auth = DevAuth(
test_users={
"john":{"username":"john", "groups":["/marketing"]},
"lisa":{"username":"lisa", "groups":["/marketing", "/interns"]},
"tim":{"username":"tim", "groups":["/hr", "/interns"]},
},
active_user="lisa"
)
Something like this:
People who have requested this: