Closed WilliamHester closed 8 years ago
Looks good, let me just give it a test run before I merge it. By the way, did you happen to run the unit tests?
Awesome, looks great! I'm glad we finally have this.
I will mention that an anonymous user can still get to the judge page by changing the URL to #/judge
, but they can't submit or upload a problem.
This one was fun. I finally went ahead and made our fabled
@admin_required
decorator, which now requires that the user that is accessing the endpoint is logged in and an admin. On a much larger note, this code allows a user to be logged out and still access the site. AnyPOST
functions are disabled, other than/api/login
(they keep the@login_required
decorator). Any buttons that would submit anything are also disabled, and the judge page is hidden from the navbar. This still needs a bit of polish, as there's an annoying bug when you try to log in using the new dropdown, but it's pretty close.