diff options
| author | Zoddo <zoddo.ino@gmail.com> | 2015-08-30 12:14:35 +0200 |
|---|---|---|
| committer | Zoddo <zoddo.ino@gmail.com> | 2015-08-30 12:18:37 +0200 |
| commit | e9e199bc378ee09f05d3497be57441b79cbd17d9 (patch) | |
| tree | eef17bc7d47efba7b711e7a5fd5088c348885efa /phpBB/phpbb/db | |
| parent | bfbce5a1b0b2e22ea2027d82d87c8bc32917a5b2 (diff) | |
| download | forums-e9e199bc378ee09f05d3497be57441b79cbd17d9.tar forums-e9e199bc378ee09f05d3497be57441b79cbd17d9.tar.gz forums-e9e199bc378ee09f05d3497be57441b79cbd17d9.tar.bz2 forums-e9e199bc378ee09f05d3497be57441b79cbd17d9.tar.xz forums-e9e199bc378ee09f05d3497be57441b79cbd17d9.zip | |
[ticket/8920] Add a MCP PM reports view permission
Anybody who has the permission to read reports in one forum
can read PM reports.
Solving this problem by adding a new permission to read PM reports.
PHPBB3-8920
Diffstat (limited to 'phpBB/phpbb/db')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/m_pm_report.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php new file mode 100644 index 0000000000..3646d64cd7 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php @@ -0,0 +1,43 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class m_pm_report extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array('\phpbb\db\migration\data\v31x\v316rc1'); + } + + public function update_data() + { + return array( + array('permission.add', array('m_pm_report', true, 'm_report')), + array('custom', array( + array($this, 'update_module_auth'), + ), + ), + ); + } + + public function update_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'acl_m_pm_report' + WHERE module_class = 'mcp' + AND module_basename = 'mcp_pm_reports' + AND module_auth = 'aclf_m_report'"; + $this->db->sql_query($sql); + } +} |
