mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Update admin notification UI and allow for deleting notifications (#803)
* Show notification titles on the notification list page * Allow for deleting notifications * Update notification UI in admin panel * Make /api/v1/notifications/<id> accessible to all * Default `login_as_user()` and `register_user()` to fail on invalid credentials
This commit is contained in:
@@ -9,6 +9,7 @@ def test_api_hint_get_non_admin():
|
||||
"""Can the users get /api/v1/hints if not admin"""
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_user(app)
|
||||
with login_as_user(app) as client:
|
||||
r = client.get('/api/v1/hints', json="")
|
||||
assert r.status_code == 403
|
||||
@@ -30,6 +31,7 @@ def test_api_hint_post_non_admin():
|
||||
"""Can the users post /api/v1/hints if not admin"""
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
register_user(app)
|
||||
with login_as_user(app) as client:
|
||||
r = client.post('/api/v1/hints', json="")
|
||||
assert r.status_code == 403
|
||||
|
||||
Reference in New Issue
Block a user