-
Notifications
You must be signed in to change notification settings - Fork 45
Rerun all submissions - allowed for super admin and with restrictions for competition admins #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…han 200. Only super admin can rerun in this case.
|
Hi Ihsan, thank you for the PR. Sorry to come up with suggestions only now but:
|
Ok this can be done
how do we know if a queue is not the public queue? |
|
Not sure if my suggestion is easy to implement or not. There are two concepts:
|
|
I have changed the conditions. Now user will be able to rerun only if
there is no condition of public or private |
that error should come from backend. Right now what you are showing is to confirm before rerunning |
|
@dtuantran I have added the ENV variable for the limit but haven't tested it because the PR is old and my local setup is new with latest updates for latest PRs. I let you test it if the ENV variable works. Evetything else is the same except that the variable now comes from django settings NOTE: you many not get the error if you are super admin. Super admins are allowed to rerun as many submissions as they want. |
I tested with a normal user and a super admin. The normal user can not re-run all submissions, however the error message couldn't show up as we wanted. |
Can you please explain what kind of error is wanted? Is the error not appearing at all? Also is the env var working? |
Sorry for missing information, the error message didn't appear at all, the one specified in your code here codabench/src/apps/api/views/competitions.py Line 613 in 9b0d3ad
The .env needs to be cast into "int" var. I have pushed the fix, then it works. |
This is strange. Did you run collectstatic? We can check this together |
|
No, I didn't run it. I'll try again.
Le mar. 19 sept. 2023 à 16:10, Ihsan Ullah ***@***.***> a
écrit :
… Sorry for missing information, the error message didn't appear at all, the
one specified in your code here
https://github.com/codalab/codabench/blob/9b0d3ad3c9af3e986cabd92e521594bd4827582e/src/apps/api/views/competitions.py#L613
This is strange. Did you run collectstatic? We can check this together
—
Reply to this email directly, view it on GitHub
<#1084 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYYSHCWDY6CW2ZUF2M5I5TX3GRU3ANCNFSM6AAAAAA3SMKDPA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
TRAN Dinh Tuan
|
Well this will fix it because error showing on front end is also new so collectstatic in needed |
|
Ok, I confirm that It works, we can merge this PR. |


@ mention of reviewers
@Didayolo @dtuantran
A brief description of the purpose of the changes contained in this PR.
Any admin of a competition was able to rerun all submissions. NOW only super admin can rerun if submissions are more than 30 otherwise competition admin can rerun
Issues this PR resolves
Checklist