Merge Dev into Master (#591)

* Chals endpoint seperation (#572)

* Separate the logic of ctftime and email confirmations and admin checking into decorators
* Separate the chals endpoint into /chals and /chals/:id. Closes #552, #435.
* Challenges are now loaded directly from the server before being displayed to the user. 
* Challenge modals now use `{{ description }}` instead of `{{ desc }}`.
* 403 is now a more common status code and can indicate that a CTF has not begun or that you are not logged in. This is in addition to CSRF failures. 
* Update tests to new behavior

* Fixing glitch if an entry chal or team id isn't defined

* Markdown it (#574)

* Replace Marked with Markdown-It

* Update modal change (#576)

* Switch update modals to use nunjucks instead of JS to load in data. 
* Fix previewing challenges after hitting the challenge update button.
* Fix edit-files issue with an unnecessary request.

* Fix solves button

* Closes #592
This commit is contained in:
Kevin Chung
2018-04-16 00:24:04 -04:00
committed by GitHub
parent d17e599193
commit 51d098080f
26 changed files with 575 additions and 403 deletions

View File

@@ -48,7 +48,8 @@ def test_verify_emails_config():
assert r.status_code == 302
r = client.get('/chals')
assert r.status_code == 403
assert r.location == "http://localhost/confirm"
assert r.status_code == 302
user = Teams.query.filter_by(id=2).first()
user.verified = True
@@ -90,7 +91,8 @@ def test_verify_and_view_unregistered():
assert r.status_code == 302
r = client.get('/chals')
assert r.status_code == 403
assert r.location == "http://localhost/confirm"
assert r.status_code == 302
user = Teams.query.filter_by(id=2).first()
user.verified = True