1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[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
This commit is contained in:
Zoddo
2015-08-30 12:14:35 +02:00
parent bfbce5a1b0
commit e9e199bc37
6 changed files with 56 additions and 10 deletions

View File

@@ -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);
}
}

View File

@@ -285,8 +285,9 @@ class permissions
'm_split' => array('lang' => 'ACL_M_SPLIT', 'cat' => 'topic_actions'),
'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'),
'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
'm_pm_report' => array('lang' => 'ACL_M_PM_REPORT', 'cat' => 'misc'),
'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
// Admin Permissions
'a_board' => array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'),