mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
dont use has_permissions to check for platform admins
platform_admin is a separate concept to permissions, so by removing the checks for it from the current_user.has_permissions function, we can simplify things greatly. We already record on the user whether they're a platform admin anyway.
This commit is contained in:
@@ -3,12 +3,12 @@ from flask_login import login_required
|
||||
|
||||
from app import inbound_number_client
|
||||
from app.main import main
|
||||
from app.utils import user_has_permissions
|
||||
from app.utils import user_is_platform_admin
|
||||
|
||||
|
||||
@main.route('/inbound-sms-admin', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@user_has_permissions(admin_override=True)
|
||||
@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