[ticket/550] Update module_auth upon update to 2.1.0
B3P-550
This commit is contained in:
@@ -23,6 +23,7 @@ class v210 extends \phpbb\db\migration\migration
|
|||||||
array('config.remove', array('board3_version_check')),
|
array('config.remove', array('board3_version_check')),
|
||||||
array('custom', array(array($this, 'add_donation_setting'))),
|
array('custom', array(array($this, 'add_donation_setting'))),
|
||||||
array('custom', array(array($this, 'convert_serialize_to_json'))),
|
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);
|
$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
|
* Unserialize links array
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user