1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-07 01:13:53 +02:00

Merge pull request from rubencm/ticket/15289-2

[ticket/15289] Allow to configure storage from acp
This commit is contained in:
Marc Alexander 2017-10-16 21:05:01 +02:00 committed by GitHub
commit d509bd9baa
6 changed files with 63 additions and 2 deletions
phpBB

@ -17,7 +17,7 @@ class acp_storage_info
{
return array(
'filename' => 'acp_storage',
'title' => 'ACP_STORAGE',
'title' => 'ACP_STORAGE_SETTINGS',
'modes' => array(
'settings' => array('title' => 'ACP_STORAGE_SETTINGS', 'auth' => 'acl_a_storage', 'cat' => array('ACP_SERVER_CONFIGURATION')),
),

@ -523,7 +523,7 @@ INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES
# -- Roles data
# Standard Admin (a_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_storage', 'a_aauth', 'a_roles');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
# Forum admin (a_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 2, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_fauth', 'a_forum', 'a_forumadd', 'a_forumdel', 'a_mauth', 'a_prune', 'a_uauth', 'a_viewauth', 'a_viewlogs');

@ -199,6 +199,7 @@ $lang = array_merge($lang, array(
'ACL_A_ROLES' => 'Can manage roles',
'ACL_A_SWITCHPERM' => 'Can use others permissions',
'ACL_A_STORAGE' => 'Can manage storages',
'ACL_A_STYLES' => 'Can manage styles',
'ACL_A_EXTENSIONS' => 'Can manage extensions',
'ACL_A_VIEWLOGS' => 'Can view logs',

@ -0,0 +1,31 @@
<?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\v330;
class acp_storage_module extends \phpbb\db\migration\migration
{
public function update_data()
{
return array(
array('module.add', array(
'acp',
'ACP_SERVER_CONFIGURATION',
array(
'module_basename' => 'acp_storage',
'modes' => array('settings'),
),
)),
);
}
}

@ -0,0 +1,28 @@
<?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\v330;
class add_storage_permission extends \phpbb\db\migration\migration
{
public function update_data()
{
return array(
// Add permission
array('permission.add', array('a_storage')),
// Set permissions
array('permission.permission_set', array('ROLE_ADMIN_FULL', 'a_storage')),
);
}
}

@ -348,6 +348,7 @@ class permissions
'a_roles' => array('lang' => 'ACL_A_ROLES', 'cat' => 'permissions'),
'a_switchperm' => array('lang' => 'ACL_A_SWITCHPERM', 'cat' => 'permissions'),
'a_storage' => array('lang' => 'ACL_A_STORAGE', 'cat' => 'misc'),
'a_styles' => array('lang' => 'ACL_A_STYLES', 'cat' => 'misc'),
'a_extensions' => array('lang' => 'ACL_A_EXTENSIONS', 'cat' => 'misc'),
'a_viewlogs' => array('lang' => 'ACL_A_VIEWLOGS', 'cat' => 'misc'),