From 0e96276a56e3a3fdf61d9f409eaac37072bdd292 Mon Sep 17 00:00:00 2001
From: Frederick Muriuki Muriithi
Date: Thu, 27 Apr 2023 05:43:52 +0300
Subject: auth: Add authorisation checks for role editting.

---
 gn3/auth/authorisation/groups/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'gn3/auth/authorisation/groups/views.py')

diff --git a/gn3/auth/authorisation/groups/views.py b/gn3/auth/authorisation/groups/views.py
index 3f4ced0..3aa54eb 100644
--- a/gn3/auth/authorisation/groups/views.py
+++ b/gn3/auth/authorisation/groups/views.py
@@ -19,7 +19,7 @@ from .models import (
     join_requests, group_role_by_id, GroupCreationError,
     accept_reject_join_request, group_users as _group_users,
     create_group as _create_group, add_privilege_to_group_role,
-    delete_privilege_to_group_role, create_group_role as _create_group_role)
+    delete_privilege_from_group_role, create_group_role as _create_group_role)
 
 from ..roles.models import Role
 from ..checks import authorised_p
@@ -392,7 +392,7 @@ def __add_remove_priv_to_from_role__(conn: db.DbConnection,
             raise NotFoundError("Privilege not found.")
         dir_fns = {
             "ADD": add_privilege_to_group_role,
-            "DELETE": delete_privilege_to_group_role
+            "DELETE": delete_privilege_from_group_role
         }
         return dir_fns[direction](
             conn,
-- 
cgit v1.2.3