From a9a4e9af63177f61bce56cca03ff485ce4717fed Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 21 Jun 2015 12:00:00 +0200 Subject: [PATCH] [ticket/550] Update module_auth upon update to 2.1.0 B3P-550 --- migrations/v210.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/migrations/v210.php b/migrations/v210.php index 082564f3..58ece8d4 100644 --- a/migrations/v210.php +++ b/migrations/v210.php @@ -23,6 +23,7 @@ class v210 extends \phpbb\db\migration\migration array('config.remove', array('board3_version_check')), array('custom', array(array($this, 'add_donation_setting'))), array('custom', array(array($this, 'convert_serialize_to_json'))), + array('custom', array(array($this, 'add_module_permissions'))), ); } @@ -89,6 +90,18 @@ class v210 extends \phpbb\db\migration\migration $this->db->sql_freeresult($result); } + /** + * Add correct module permissions to ACP modules + */ + public function add_module_permissions() + { + $sql = 'UPDATE ' . $this->table_prefix . "modules + SET module_auth = 'ext_board3/portal && acl_a_manage_portal' + WHERE module_basename = '\\\\board3\\\\portal\\\\acp\\\\portal_module' + AND module_auth = 'acl_a_manage_portal'"; + $this->db->sql_query($sql); + } + /** * Unserialize links array *