From c88d7ebc08f3070c84c66c12ab00f6c65904019a Mon Sep 17 00:00:00 2001 From: Maarten de Waard Date: Wed, 15 Jun 2022 14:30:19 +0200 Subject: [PATCH] Only allow Admins to add new users --- areas/users/users.py | 1 + 1 file changed, 1 insertion(+) diff --git a/areas/users/users.py b/areas/users/users.py index a413455..4536586 100644 --- a/areas/users/users.py +++ b/areas/users/users.py @@ -32,6 +32,7 @@ def get_user(id): @jwt_required() @cross_origin() @expects_json(schema) +@admin_required() def post_user(): data = request.get_json() res = UserService.post_user(data)