diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 3dc34d36d2..69d8c41853 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -103,8 +103,19 @@ break; } - //redirect the user + //clear the cache, reloadacl and redirect the user if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) { + //clear the cache + $cache = new cache; + $cache->delete("configuration:acl.conf"); + + //create the event socket connection + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + if ($fp) { + event_socket_request($fp, "api reloadacl"); + } + + //redirect the user header('Location: access_control_edit.php?id='.$id); exit; } @@ -162,6 +173,16 @@ $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; $database->save($array); + //clear the cache + $cache = new cache; + $cache->delete("configuration:acl.conf"); + + //create the event socket connection + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + if ($fp) { + event_socket_request($fp, "api reloadacl"); + } + //redirect the user if (isset($action)) { if ($action == "add") {