Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -39,11 +39,11 @@ def auth_callback(username: str, password: str):
|
|
| 39 |
resultRole = next(d['role'] for d in auth if d['ident'] == username)
|
| 40 |
if resultLogAdmin and resultPwdAdmin and resultRole == "admindatapcc":
|
| 41 |
return cl.User(
|
| 42 |
-
identifier="π§βπΌ Admin Datapcc", metadata={"role": "admin", "provider": "credentials"}
|
| 43 |
)
|
| 44 |
elif resultLogAdmin and resultPwdAdmin and resultRole == "userdatapcc":
|
| 45 |
return cl.User(
|
| 46 |
-
identifier="π§βπ User Datapcc", metadata={"role": "user", "provider": "credentials"}
|
| 47 |
)
|
| 48 |
|
| 49 |
def modele(document):
|
|
|
|
| 39 |
resultRole = next(d['role'] for d in auth if d['ident'] == username)
|
| 40 |
if resultLogAdmin and resultPwdAdmin and resultRole == "admindatapcc":
|
| 41 |
return cl.User(
|
| 42 |
+
identifier=ident + " : π§βπΌ Admin Datapcc", metadata={"role": "admin", "provider": "credentials"}
|
| 43 |
)
|
| 44 |
elif resultLogAdmin and resultPwdAdmin and resultRole == "userdatapcc":
|
| 45 |
return cl.User(
|
| 46 |
+
identifier=ident + " : π§βπ User Datapcc", metadata={"role": "user", "provider": "credentials"}
|
| 47 |
)
|
| 48 |
|
| 49 |
def modele(document):
|