Upload folder using huggingface_hub
Browse files- src/endopath/api.py +6 -0
src/endopath/api.py
CHANGED
|
@@ -826,6 +826,9 @@ def login(
|
|
| 826 |
"display_name": identity.display_name,
|
| 827 |
"role": identity.role,
|
| 828 |
"holds_licence": identity.holds_licence,
|
|
|
|
|
|
|
|
|
|
| 829 |
}
|
| 830 |
|
| 831 |
|
|
@@ -879,6 +882,9 @@ def demo_session(
|
|
| 879 |
"display_name": identity.display_name,
|
| 880 |
"role": identity.role,
|
| 881 |
"holds_licence": identity.holds_licence,
|
|
|
|
|
|
|
|
|
|
| 882 |
}
|
| 883 |
|
| 884 |
|
|
|
|
| 826 |
"display_name": identity.display_name,
|
| 827 |
"role": identity.role,
|
| 828 |
"holds_licence": identity.holds_licence,
|
| 829 |
+
# From the same set `_reject_read_only` gates on, so the UI arms a write control exactly where
|
| 830 |
+
# the API accepts one.
|
| 831 |
+
"can_write": identity.role not in _READ_ONLY_ROLES,
|
| 832 |
}
|
| 833 |
|
| 834 |
|
|
|
|
| 882 |
"display_name": identity.display_name,
|
| 883 |
"role": identity.role,
|
| 884 |
"holds_licence": identity.holds_licence,
|
| 885 |
+
# From the same set `_reject_read_only` gates on, so the UI arms a write control exactly where
|
| 886 |
+
# the API accepts one.
|
| 887 |
+
"can_write": identity.role not in _READ_ONLY_ROLES,
|
| 888 |
}
|
| 889 |
|
| 890 |
|