mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/soft-delete] Remove *_restore permissions from the update/install
We decided to use only m_approve for now. PHPBB3-9657
This commit is contained in:
parent
1a07cd63a1
commit
70a409d4b5
2 changed files with 4 additions and 6 deletions
|
@ -2926,14 +2926,14 @@ function change_database_data(&$no_updates, $version)
|
|||
}
|
||||
}
|
||||
|
||||
// Add new permissions f_restore, f_softdelete, m_restore and m_softdelete
|
||||
// Add new permissions f_softdelete and m_softdelete
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
$auth_admin = new auth_admin();
|
||||
|
||||
// Only add the new permission if it does not already exist
|
||||
if (empty($auth_admin->acl_options['id']['f_restore']))
|
||||
if (empty($auth_admin->acl_options['id']['f_softdelete']))
|
||||
{
|
||||
$auth_admin->acl_add_option(array('local' => array('f_restore', 'f_softdelete', 'm_restore', 'm_softdelete')));
|
||||
$auth_admin->acl_add_option(array('local' => array('f_softdelete', 'm_softdelete')));
|
||||
|
||||
// Remove any old permission entries
|
||||
$auth_admin->acl_clear_prefetch();
|
||||
|
|
|
@ -316,7 +316,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1);
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_restore', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_softdelete', 1);
|
||||
|
||||
# -- Moderator related auth options
|
||||
|
@ -331,7 +330,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merg
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_restore', 1, 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_softdelete', 1, 1);
|
||||
|
||||
# -- Global moderator auth option (not a local option)
|
||||
|
@ -518,7 +516,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
|||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
|
||||
|
||||
# Simple Moderator (m_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_restore', 'm_edit', 'm_info', 'm_report');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report');
|
||||
|
||||
# Queue Moderator (m_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
|
||||
|
|
Loading…
Add table
Reference in a new issue