mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-22 08:58:46 -04:00
Fix permissions check for inviting users to a service
This changeset reverts a change we had made previously where we accidentally locked down the ability for service admins to invite other users to their own service. This removes the platform admin user check and reverts it back to the proper permissions check (including adjusting the tests to account for this). Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -21,7 +21,7 @@ from app.main.forms import (
|
||||
SearchUsersForm,
|
||||
)
|
||||
from app.models.user import InvitedUser, User
|
||||
from app.utils.user import is_gov_user, user_has_permissions, user_is_platform_admin
|
||||
from app.utils.user import is_gov_user, user_has_permissions
|
||||
from app.utils.user_permissions import permission_options
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ def manage_users(service_id):
|
||||
@main.route(
|
||||
"/services/<uuid:service_id>/users/invite/<uuid:user_id>", methods=["GET", "POST"]
|
||||
)
|
||||
@user_is_platform_admin
|
||||
@user_has_permissions("manage_service")
|
||||
def invite_user(service_id, user_id=None):
|
||||
form_class = InviteUserForm
|
||||
form = form_class(
|
||||
|
||||
Reference in New Issue
Block a user