From 7df26c36cbcb101d1ada17139f318136dc2120c2 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Tue, 23 Jul 2019 15:53:54 +0200 Subject: [PATCH] fixed grant permission bug --- src/PermissionManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PermissionManager.cpp b/src/PermissionManager.cpp index 7bd6a4b..efc0796 100644 --- a/src/PermissionManager.cpp +++ b/src/PermissionManager.cpp @@ -1179,7 +1179,7 @@ void v2::PermissionManager::set_permission(const PermissionType &permission, con if(action_grant == v2::PermissionUpdateType::set_value) { data.flags.grant_set = true; data.flags.flag_grant_update = true; - data.values.grant = values.value; + data.values.grant = values.grant; } else if(action_grant == v2::PermissionUpdateType::delete_value) { data.flags.grant_set = false; data.flags.flag_grant_update = true; @@ -1242,7 +1242,7 @@ void v2::PermissionManager::set_channel_permission(const PermissionType &permiss } else if(action_value == v2::PermissionUpdateType::delete_value) { permission_container->flags.value_set = false; permission_container->flags.flag_value_update = true; - permission_container->values.grant = permNotGranted; /* required for the database else it does not "deletes" the value */ + permission_container->values.value = permNotGranted; /* required for the database else it does not "deletes" the value */ } if(action_grant == v2::PermissionUpdateType::set_value) {