Abhishek Thakur
commited on
Commit
·
640dcf4
1
Parent(s):
4447bdd
allow finegrained
Browse files- competitions/create.py +1 -1
competitions/create.py
CHANGED
|
@@ -91,7 +91,7 @@ def check_if_user_can_create_competition(user_token):
|
|
| 91 |
if "error" in user_info:
|
| 92 |
return_msg = "Invalid token. You can find your HF token here: https://huggingface.co/settings/tokens"
|
| 93 |
|
| 94 |
-
elif user_info["auth"]["accessToken"]["role"]
|
| 95 |
return_msg = "Please provide a token with write access"
|
| 96 |
|
| 97 |
if return_msg is not None:
|
|
|
|
| 91 |
if "error" in user_info:
|
| 92 |
return_msg = "Invalid token. You can find your HF token here: https://huggingface.co/settings/tokens"
|
| 93 |
|
| 94 |
+
elif user_info["auth"]["accessToken"]["role"] not in ("write", "fineGrained"):
|
| 95 |
return_msg = "Please provide a token with write access"
|
| 96 |
|
| 97 |
if return_msg is not None:
|