/** * @internal * @param string $module * @param string $role_id * @param string $field_id * @param string $access */ function setAccessControl($module, $role_id, $field_id, $access) { $acl = new ACLField(); $id = md5($module . $role_id . $field_id); if (!$acl->retrieve($id)) { //if we don't have a value and its never been saved no need to start now if (empty($access)) { return false; } $acl->id = $id; $acl->new_with_id = true; } $acl->aclaccess = $access; $acl->category = $module; $acl->name = $field_id; $acl->role_id = $role_id; $acl->save(); }