mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Have permissions decorators check user signed in
Rather than force us to write the decorators in a specific order let’s just have one decorator call the other. This should make fewer lines of code, and fewer annoying test failures. It also means that the same way of raising a `401` (through the `current_app` method) is used everywhere.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from flask import render_template
|
||||
from flask_login import login_required
|
||||
|
||||
from app import inbound_number_client
|
||||
from app.main import main
|
||||
@@ -7,7 +6,6 @@ from app.utils import user_is_platform_admin
|
||||
|
||||
|
||||
@main.route('/inbound-sms-admin', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@user_is_platform_admin
|
||||
def inbound_sms_admin():
|
||||
data = inbound_number_client.get_all_inbound_sms_number_service()
|
||||
|
||||
Reference in New Issue
Block a user