mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 06:38:43 +01:00
implementing permission roles
- copy permissions (adding groups) - copy permissions (adding forums) - checking proper groupadd/del settings - added intro page to permissions (to give an overview and quick links) - able to select forums + subforums, single forum, all groups, all users (permission screens) - able to reset permissions (only reset input field) - fix forum deletion bug git-svn-id: file:///svn/phpbb/trunk@5574 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
19d5dddaeb
commit
6b13f94be9
@ -99,6 +99,12 @@
|
||||
<dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
|
||||
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- IF S_ADD_ACTION -->
|
||||
<dl>
|
||||
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->>
|
||||
|
@ -42,6 +42,13 @@
|
||||
<!-- ELSE -->
|
||||
<input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" />
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_ADD_GROUP -->
|
||||
<dl>
|
||||
<dt><label for="group_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
|
||||
<dd><select id="group_perm_from" name="group_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_GROUP_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@ -271,7 +278,9 @@
|
||||
</table>
|
||||
|
||||
<fieldset class="quick">
|
||||
{L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
|
||||
<!-- IF S_GROUP_ADD -->
|
||||
{L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<h1>{L_SPECIAL_GROUPS}</h1>
|
||||
@ -294,7 +303,7 @@
|
||||
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
|
||||
<td style="text-align: center;"><a href="{groups.U_DEFAULT}">{L_GROUP_DEFAULT}</a></td>
|
||||
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_EDIT}</a></td>
|
||||
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
|
||||
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- END groups -->
|
||||
|
224
phpBB/adm/style/acp_permission_roles.html
Normal file
224
phpBB/adm/style/acp_permission_roles.html
Normal file
@ -0,0 +1,224 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<!-- IF S_EDIT -->
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var active_option = 'options0';
|
||||
|
||||
// Show/hide option panels
|
||||
// value = suffix for ID to show
|
||||
function swap_options(id)
|
||||
{
|
||||
if (id == active_option)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide active options and display container
|
||||
dE(active_option, -1);
|
||||
dE(id, 1);
|
||||
|
||||
active_option = id;
|
||||
}
|
||||
|
||||
// Mark all radio buttons in one panel
|
||||
// id = table ID container, s = status ['y'/'u'/'n']
|
||||
function mark_options(id, s)
|
||||
{
|
||||
var t = document.getElementById(id);
|
||||
|
||||
if (!t)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var rb = t.getElementsByTagName('input');
|
||||
|
||||
for (var r = 0; r < rb.length; r++ )
|
||||
{
|
||||
if (rb[r].id.substr(rb[r].id.length-1) == s)
|
||||
{
|
||||
rb[r].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<a href="{U_BACK}" style="float: right">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_roles" method="post" action="{U_ACTION}">
|
||||
|
||||
<br />
|
||||
<a href="#acl">» {L_SET_ROLE_PERMISSIONS}</a>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ROLE_DETAILS}</legend>
|
||||
<dl>
|
||||
<dt><label for="role_name">{L_ROLE_NAME}:</label></dt>
|
||||
<dd><input name="role_name" type="text" id="role_name" value="{ROLE_NAME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="pre_select">{L_DISPLAY_FOR_GROUP}:</label><br /><span>{L_DISPLAY_FOR_GROUP_EXPLAIN}</span></dt>
|
||||
<dd><select name="pre_select" id="pre_select" onchange="if(this.value=='custom'){dE('custom_group',1);}else{dE('custom_group',-1);}">{S_PRESELECT_OPTIONS}</select></dd>
|
||||
<dd id="custom_group"<!-- IF not S_CUSTOM_GROUP_IDS --> style="display:none;"<!-- ENDIF -->>
|
||||
<select name="role_group_ids[]" id="role_group_id" style="width: 100%;" multiple="multiple" size="10">{S_GROUP_OPTIONS}</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
<input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
|
||||
</fieldset>
|
||||
|
||||
<!-- IF S_DISPLAY_ROLE_MASK -->
|
||||
|
||||
<h1>{L_ROLE_ASSIGNED_TO}</h1>
|
||||
|
||||
<!-- INCLUDE permission_roles_mask.html -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<a name="acl"></a>
|
||||
|
||||
<a href="#maincontent">» {L_BACK_TO_TOP}</a><br />
|
||||
<br /><br />
|
||||
|
||||
<h1>{L_ACL_TYPE}</h1>
|
||||
|
||||
<fieldset class="quick">
|
||||
<a href="javascript: mark_options('a_options', 'y');">{L_ALL_YES}</a> • <a href="javascript: mark_options('a_options', 'n');">{L_ALL_NO}</a> • <a href="javascript: mark_options('a_options', 'u');">{L_ALL_UNSET}</a>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="permissions">
|
||||
|
||||
<table cellspacing="1" class="pmask">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- BEGIN auth -->
|
||||
<th>{auth.CAT_NAME}</th>
|
||||
<!-- END auth -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- BEGIN auth -->
|
||||
<!-- IF auth.S_YES -->
|
||||
<td class="preset_yes">
|
||||
<!-- ELSEIF auth.S_NO -->
|
||||
<td class="preset_no">
|
||||
<!-- ELSEIF auth.S_UNSET -->
|
||||
<td class="preset_unset">
|
||||
<!-- ELSE -->
|
||||
<td class="preset_custom">
|
||||
<!-- ENDIF -->
|
||||
<a href="javascript:swap_options('options{auth.S_ROW_COUNT}');"><span> </span></a></td>
|
||||
<!-- END auth -->
|
||||
</tr>
|
||||
<tr class="row3">
|
||||
<td colspan="{S_NUM_PERM_COLS}" id="a_options" style="vertical-align: top; text-align: left; width: 100%;">
|
||||
<!-- BEGIN auth -->
|
||||
<table cellspacing="1" id="options{auth.S_ROW_COUNT}" class="type3" style="width: 100%; text-align: left;<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> display: none;<!-- ENDIF -->">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="text-align: left; padding-left: 0;"><strong>{L_ACL_SETTING} [{auth.CAT_NAME}]</strong></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'y');">{L_ACL_YES}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'u');">{L_ACL_UNSET}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{auth.S_ROW_COUNT}', 'n');">{L_ACL_NO}</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN mask -->
|
||||
<!-- IF auth.mask.S_ROW_COUNT is even --><tr class="row4"><!-- ELSE --><tr class="row3"><!-- ENDIF -->
|
||||
<th>{auth.mask.PERMISSION}</th>
|
||||
<td class="unset"><input id="setting[{auth.mask.FIELD_NAME}]_y" name="setting[{auth.mask.FIELD_NAME}]" type="radio"<!-- IF auth.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
|
||||
<td class="unset"><input id="setting[{auth.mask.FIELD_NAME}]_u" name="setting[{auth.mask.FIELD_NAME}]" type="radio"<!-- IF auth.mask.S_UNSET --> checked="checked"<!-- ENDIF --> value="-1" /></td>
|
||||
<td class="unset"><input id="setting[{auth.mask.FIELD_NAME}]_n" name="setting[{auth.mask.FIELD_NAME}]" type="radio"<!-- IF auth.mask.S_NO --> checked="checked"<!-- ENDIF --> value="0" /></td>
|
||||
</tr>
|
||||
<!-- END mask -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- END auth -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
<input type="submit" class="button1" name="submit" value="{L_SUBMIT}" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<a href="#maincontent">» {L_BACK_TO_TOP}</a><br />
|
||||
<br />
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
||||
<form id="acp_roles" method="post" action="{U_ACTION}">
|
||||
|
||||
<table cellspacing="1">
|
||||
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50%">{L_ROLE_NAME}</th>
|
||||
<th>{L_DISPLAY_FOR_GROUP}</th>
|
||||
<th colspan="3">{L_OPTIONS}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN roles -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><b>{roles.NAME}</b></td>
|
||||
<td style="vertical-align: top;">
|
||||
<!-- IF roles.S_GROUP -->
|
||||
<!-- BEGIN groups -->
|
||||
<a href="{roles.groups.U_GROUP}">{roles.groups.GROUP_NAME}</a><br />
|
||||
<!-- END groups -->
|
||||
<!-- ELSE -->
|
||||
{L_EVERY_USER_GROUP}
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top; white-space: nowrap;"><a href="{roles.U_EDIT}">{L_EDIT_ROLE}</a></td>
|
||||
<td style="vertical-align: top; white-space: nowrap;"><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a></td>
|
||||
<td style="vertical-align: top; white-space: nowrap;"><a href="{roles.U_REMOVE}">{L_REMOVE_ROLE}</a></td>
|
||||
</tr>
|
||||
<!-- END roles -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset class="quick">
|
||||
{L_CREATE_ROLE}: <input type="text" name="role_name" value="" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- IF S_DISPLAY_ROLE_MASK -->
|
||||
|
||||
<a name="assigned_to"></a>
|
||||
|
||||
<h1>{L_ROLE_ASSIGNED_TO}</h1>
|
||||
|
||||
<!-- INCLUDE permission_roles_mask.html -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@ -2,6 +2,16 @@
|
||||
|
||||
<a name="maincontent"></a>
|
||||
|
||||
<!-- IF S_INTRO -->
|
||||
|
||||
<h1>{L_ACP_PERMISSIONS}</h1>
|
||||
|
||||
<p>{L_ACP_PERMISSIONS_EXPLAIN}</p>
|
||||
|
||||
Here, an introductionary text will be placed, explaining permissions and the several menu items. Also adding quick links to this page.
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_SELECT_VICTIM -->
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
@ -33,6 +43,45 @@
|
||||
|
||||
</form>
|
||||
|
||||
<!-- IF S_FORUM_MULTIPLE -->
|
||||
|
||||
<form id="select_subforum" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
<p>{L_SELECT_FORUM_SUBFORUM_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="sforum">{L_LOOK_UP_FORUM}:</label></dt>
|
||||
<dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<form id="select_single_forum" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
<dl>
|
||||
<dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
|
||||
<dd><select id="forum" name="forum_id[]">{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER -->
|
||||
|
||||
<form id="select_victim" method="post" action="{U_ACTION}">
|
||||
@ -87,6 +136,7 @@
|
||||
<legend>{L_MANAGE_USERS}</legend>
|
||||
<dl>
|
||||
<dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
|
||||
<dd class="full" style="text-align: right;"><input type="checkbox" name="all_users" value="1" /> {L_ALL_USERS}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@ -133,6 +183,7 @@
|
||||
<legend>{L_MANAGE_GROUPS}</legend>
|
||||
<dl>
|
||||
<dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
|
||||
<dd class="full" style="text-align: right;"><input type="checkbox" name="all_groups" value="1" /> {L_ALL_GROUPS}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@ -301,12 +352,13 @@
|
||||
<br /><br />
|
||||
|
||||
<fieldset class="quick" style="float: left;">
|
||||
{L_PERM_PRESET_APPLIED_TO_ALL}<br />
|
||||
{L_PERMISSION_APPLIED_TO_ALL}<br />
|
||||
<a href="javascript:marklist('set_permissions', 'inherit', true);">{L_MARK_ALL}</a> • <a href="javascript:marklist('set_permissions', 'inherit', false);">{L_UNMARK_ALL}</a>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick" style="float: right;">
|
||||
<input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" />
|
||||
<input class="button2" type="reset" name="cancel" value="{L_RESET}" />
|
||||
</fieldset>
|
||||
|
||||
<br /><br />
|
||||
|
@ -5,6 +5,12 @@
|
||||
var active_fmask = '0';
|
||||
var active_cat = '0';
|
||||
|
||||
var role_options = new Array();
|
||||
|
||||
<!-- IF S_ROLE_JS_ARRAY -->
|
||||
{S_ROLE_JS_ARRAY}
|
||||
<!-- ENDIF -->
|
||||
|
||||
// Show/hide option panels
|
||||
// value = suffix for ID to show
|
||||
function swap_options(pmask, fmask, cat)
|
||||
@ -33,7 +39,7 @@
|
||||
}
|
||||
|
||||
// Mark all radio buttons in one panel
|
||||
// id = table ID container, s = status [1/-1/0]
|
||||
// id = table ID container, s = status ['y'/'u'/'n']
|
||||
function mark_options(id, s)
|
||||
{
|
||||
var t = document.getElementById(id);
|
||||
@ -54,6 +60,60 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Mark one radio button in one panel
|
||||
// id = table ID container, field_name = the auth option, s = status ['y'/'u'/'n']
|
||||
function mark_one_option(id, field_name, s)
|
||||
{
|
||||
var t = document.getElementById(id);
|
||||
|
||||
if (!t)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var rb = t.getElementsByTagName('input');
|
||||
|
||||
for (var r = 0; r < rb.length; r++ )
|
||||
{
|
||||
if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) == field_name && rb[r].id.substr(rb[r].id.length-1) == s)
|
||||
{
|
||||
rb[r].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset role dropdown field to Select role... if an option gets changed
|
||||
function reset_role(id)
|
||||
{
|
||||
var t = document.getElementById(id);
|
||||
|
||||
if (!t)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
t.options[0].selected = true;
|
||||
}
|
||||
|
||||
// Load role and set options accordingly
|
||||
function set_role_settings(role_id, target_id)
|
||||
{
|
||||
settings = role_options[role_id];
|
||||
|
||||
if (!settings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Mark all options to unset first...
|
||||
mark_options(target_id, 'u');
|
||||
|
||||
for (var r in settings)
|
||||
{
|
||||
mark_one_option(target_id, r, (settings[r] == 1) ? 'y' : 'n');
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
@ -93,11 +153,11 @@
|
||||
<!-- IF p_mask.S_VIEW -->
|
||||
|
||||
<!-- ELSE -->
|
||||
<!-- <b>{L_PRESET}:</b> <select name="preset[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">
|
||||
<option value="">Select preset...</option>
|
||||
<option value="2">Valued Members</option>
|
||||
<option value="3">Restricted Access</option>
|
||||
</select> -->
|
||||
<!-- IF p_mask.f_mask.S_ROLE_OPTIONS -->
|
||||
<b>{L_ROLE}:</b> <select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select>
|
||||
<!-- ELSE -->
|
||||
<b>{L_ROLE}:</b> {L_NO_ROLE_AVAILABLE}
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
</tr>
|
||||
@ -126,7 +186,11 @@
|
||||
<input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
|
||||
</div>
|
||||
<div style="float: right; text-align: right; width: 35%;">
|
||||
<p class="small"><a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y')">{L_ALL_YES}</a> • <a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n')">{L_ALL_NO}</a> • <a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u')">{L_ALL_UNSET}</a></p>
|
||||
<p class="small">
|
||||
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_YES}</a>]<br />
|
||||
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_NO}</a>]<br />
|
||||
[<a href="javascript: mark_options('a_options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ALL_UNSET}</a>]
|
||||
</p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
|
||||
@ -144,9 +208,9 @@
|
||||
<th scope="col">{L_ACL_YES}</th>
|
||||
<th scope="col">{L_ACL_NO}</th>
|
||||
<!-- ELSE -->
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y')">{L_ACL_YES}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u')">{L_ACL_UNSET}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n')">{L_ACL_NO}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'y'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_YES}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'u'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_UNSET}</a></th>
|
||||
<th scope="col"><a href="javascript: mark_options('options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}', 'n'); reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}');">{L_ACL_NO}</a></th>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
</thead>
|
||||
@ -158,9 +222,9 @@
|
||||
<td<!-- IF p_mask.f_mask.category.mask.S_YES --> class="yes"<!-- ELSE --> class="unset"<!-- ENDIF -->> </td>
|
||||
<td<!-- IF p_mask.f_mask.category.mask.S_NO --> class="no"<!-- ELSE --> class="unset"<!-- ENDIF -->> </td>
|
||||
<!-- ELSE -->
|
||||
<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
|
||||
<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_UNSET --> checked="checked"<!-- ENDIF --> value="-1" /></td>
|
||||
<td class="unset"><input id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="0" /></td>
|
||||
<td class="unset"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_y" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_YES --> checked="checked"<!-- ENDIF --> value="1" /></td>
|
||||
<td class="unset"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_u" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_UNSET --> checked="checked"<!-- ENDIF --> value="-1" /></td>
|
||||
<td class="unset"><input onchange="reset_role('role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')" id="{p_mask.f_mask.category.mask.S_FIELD_NAME}_n" name="{p_mask.f_mask.category.mask.S_FIELD_NAME}" type="radio"<!-- IF p_mask.f_mask.category.mask.S_NO --> checked="checked"<!-- ENDIF --> value="0" /></td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- END mask -->
|
||||
|
38
phpBB/adm/style/permission_roles_mask.html
Normal file
38
phpBB/adm/style/permission_roles_mask.html
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
<!-- BEGIN role_mask -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption><!-- IF role_mask.FORUM_ID -->{L_FORUM}: <!-- ENDIF -->{role_mask.NAME}</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{L_USERS}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">
|
||||
<!-- BEGIN users -->
|
||||
<a href="{role_mask.users.U_PROFILE}">{role_mask.users.USERNAME}</a><!-- IF not role_mask.users.S_LAST_ROW --> :: <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
{L_USERS_NOT_ASSIGNED}
|
||||
<!-- END users -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{L_GROUPS}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row2">
|
||||
<!-- BEGIN groups -->
|
||||
<a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
{L_GROUPS_NOT_ASSIGNED}
|
||||
<!-- END users -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- BEGINELSE -->
|
||||
|
||||
<p>{L_ROLE_NOT_ASSIGNED}</p>
|
||||
|
||||
<!-- END role_mask -->
|
@ -144,6 +144,35 @@ class acp_forums
|
||||
|
||||
if (!sizeof($errors))
|
||||
{
|
||||
$forum_perm_from = request_var('forum_perm_from', 0);
|
||||
|
||||
// Copy permissions?
|
||||
if ($forum_perm_from && $action == 'add')
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_id' => array('user_id'),
|
||||
'forum_id' => (int) $forum_data['forum_id'],
|
||||
'auth_option_id' => array('auth_option_id'),
|
||||
'auth_role_id' => array('auth_role_id'),
|
||||
'auth_setting' => array('auth_setting')
|
||||
);
|
||||
|
||||
// We copy the permissions the manual way. ;)
|
||||
$sql = 'INSERT INTO ' . ACL_USERS_TABLE . ' ' . $db->sql_build_array('INSERT_SELECT', $sql_ary) . '
|
||||
FROM ' . ACL_USERS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_perm_from;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change array for copying settings from the acl groups table
|
||||
unset($sql_ary['user_id']);
|
||||
$sql_ary['group_id'] = array('group_id');
|
||||
|
||||
$sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT_SELECT', $sql_ary) . '
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_perm_from;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
recalc_btree('forum_id', FORUMS_TABLE);
|
||||
|
||||
@ -477,6 +506,7 @@ class acp_forums
|
||||
'S_STATUS_OPTIONS' => $statuslist,
|
||||
'S_PARENT_OPTIONS' => $parents_list,
|
||||
'S_STYLES_OPTIONS' => $styles_list,
|
||||
'S_FORUM_OPTIONS' => make_forum_select(false, false, false),
|
||||
'S_SHOW_DISPLAY_ON_INDEX' => $s_show_display_on_index,
|
||||
'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
|
||||
'S_FORUM_ORIG_POST' => (isset($old_forum_type) && $old_forum_type == FORUM_POST) ? true : false,
|
||||
@ -1309,7 +1339,7 @@ class acp_forums
|
||||
// Set forum ids to 0
|
||||
$table_ary = array(DRAFTS_TABLE);
|
||||
|
||||
foreach ($tables_ary as $table)
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$db->sql_query("UPDATE $table SET forum_id = 0 WHERE forum_id = $forum_id");
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
* @todo make sure permissions are met for adding groups and removing groups (a_groupadd, a_groupdel)
|
||||
*/
|
||||
class acp_groups
|
||||
{
|
||||
@ -164,6 +163,11 @@ class acp_groups
|
||||
switch ($action)
|
||||
{
|
||||
case 'delete':
|
||||
if (!$auth->acl_get('a_groupdel'))
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$error = group_delete($group_id, $group_row['group_name']);
|
||||
break;
|
||||
|
||||
@ -225,6 +229,11 @@ class acp_groups
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
|
||||
{
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$error = array();
|
||||
$user->add_lang('ucp');
|
||||
|
||||
@ -309,7 +318,7 @@ class acp_groups
|
||||
$test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'message_limit');
|
||||
foreach ($test_variables as $test)
|
||||
{
|
||||
if ($action == 'add' || (isset($submit_ary[$test]) && $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
|
||||
{
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
}
|
||||
@ -317,6 +326,28 @@ class acp_groups
|
||||
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_description, $group_attributes)))
|
||||
{
|
||||
$group_perm_from = request_var('group_perm_from', 0);
|
||||
|
||||
// Copy permissions?
|
||||
if ($group_perm_from && $action == 'add')
|
||||
{
|
||||
$sql_ary = array(
|
||||
'group_id' => $group_id,
|
||||
'forum_id' => array('forum_id'),
|
||||
'auth_option_id' => array('auth_option_id'),
|
||||
'auth_role_id' => array('auth_role_id'),
|
||||
'auth_setting' => array('auth_setting')
|
||||
);
|
||||
|
||||
// We copy the permissions the manual way. ;)
|
||||
$sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT_SELECT', $sql_ary) . '
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE group_id = ' . $group_perm_from;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
}
|
||||
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
|
||||
}
|
||||
@ -398,6 +429,7 @@ class acp_groups
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'S_ADD_GROUP' => ($action == 'add') ? true : false,
|
||||
'S_INCLUDE_SWATCH' => true,
|
||||
'S_CAN_UPLOAD' => $can_upload,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
@ -414,6 +446,7 @@ class acp_groups
|
||||
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
|
||||
|
||||
'S_RANK_OPTIONS' => $rank_options,
|
||||
'S_GROUP_OPTIONS' => group_select_options(0),
|
||||
'AVATAR_IMAGE' => $avatar_img,
|
||||
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
|
||||
'GROUP_AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
|
||||
@ -562,7 +595,7 @@ class acp_groups
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
)
|
||||
'S_GROUP_ADD' => ($auth->acl_get('a_groupadd')) ? true : false)
|
||||
);
|
||||
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type, COUNT(ug.user_id) AS total_members
|
||||
@ -609,7 +642,7 @@ class acp_groups
|
||||
'U_LIST' => "{$this->u_action}&action=list&g=$group_id",
|
||||
'U_DEFAULT' => "{$this->u_action}&action=default&g=$group_id",
|
||||
'U_EDIT' => "{$this->u_action}&action=edit&g=$group_id",
|
||||
'U_DELETE' => "{$this->u_action}&action=delete&g=$group_id",
|
||||
'U_DELETE' => ($auth->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '',
|
||||
|
||||
'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||
|
||||
|
@ -661,7 +661,7 @@ class acp_modules
|
||||
if (!$ignore_acl && $row['module_auth'])
|
||||
{
|
||||
$is_auth = false;
|
||||
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#e', '#\$id#', '#cfg_([a-z_]+)#e'), array('(int) $auth->acl_get("\\1"\\2)', '$this->acl_forup_id', '(int) $config["\\1"]'), trim($row['module_auth'])) . ');');
|
||||
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $auth->acl_getf_global("\\1")', '(int) $config["\\1"]'), $row['module_auth']) . ');');
|
||||
if (!$is_auth)
|
||||
{
|
||||
continue;
|
||||
|
776
phpBB/includes/acp/acp_permission_roles.php
Normal file
776
phpBB/includes/acp/acp_permission_roles.php
Normal file
@ -0,0 +1,776 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acp
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package acp
|
||||
*/
|
||||
class acp_permission_roles
|
||||
{
|
||||
var $u_action;
|
||||
var $pre_selection_array;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
|
||||
$auth_admin = new auth_admin();
|
||||
|
||||
$user->add_lang('acp/permissions');
|
||||
$user->add_lang('acp/permissions_phpbb');
|
||||
|
||||
$this->tpl_name = 'acp_permission_roles';
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$role_id = request_var('role_id', 0);
|
||||
$action = request_var('action', '');
|
||||
$action = (isset($_POST['add'])) ? 'add' : $action;
|
||||
|
||||
// Define pre-selection array
|
||||
$this->pre_selection_array = array(
|
||||
1 => array('lang' => 'PRE_ONLY_SPECIAL_GUEST', 'type' => GROUP_SPECIAL, 'name' => array('BOTS', 'GUESTS', 'INACTIVE', 'INACTIVE_COPPA'), 'negate' => false),
|
||||
2 => array('lang' => 'PRE_ONLY_SPECIAL_REGISTERED', 'type' => GROUP_SPECIAL, 'name' => array('ADMINISTRATORS', 'SUPER_MODERATORS', 'REGISTERED', 'REGISTERED_COPPA'), 'negate' => false),
|
||||
3 => array('lang' => 'PRE_NOT_SPECIAL_GUEST', 'type' => GROUP_SPECIAL, 'name' => array('BOTS', 'GUESTS', 'INACTIVE', 'INACTIVE_COPPA'), 'negate' => true),
|
||||
4 => array('lang' => 'PRE_NOT_SPECIAL_REGISTERED', 'type' => GROUP_SPECIAL, 'name' => array('ADMINISTRATORS', 'SUPER_MODERATORS', 'REGISTERED', 'REGISTERED_COPPA'), 'negate' => true),
|
||||
5 => array('lang' => 'PRE_ALL_SPECIAL', 'type' => GROUP_SPECIAL, 'negate' => false),
|
||||
6 => array('lang' => 'PRE_NOT_SPECIAL', 'type' => GROUP_SPECIAL, 'negate' => true),
|
||||
7 => array('lang' => 'PRE_ALL_FREE', 'type' => GROUP_FREE, 'negate' => false),
|
||||
8 => array('lang' => 'PRE_NOT_FREE', 'type' => GROUP_FREE, 'negate' => true),
|
||||
9 => array('lang' => 'PRE_ALL_CLOSED', 'type' => GROUP_CLOSED, 'negate' => false),
|
||||
10 => array('lang' => 'PRE_NOT_CLOSED', 'type' => GROUP_CLOSED, 'negate' => true),
|
||||
11 => array('lang' => 'PRE_ALL_HIDDEN', 'type' => GROUP_HIDDEN, 'negate' => false),
|
||||
12 => array('lang' => 'PRE_NOT_HIDDEN', 'type' => GROUP_HIDDEN, 'negate' => true),
|
||||
13 => array('lang' => 'PRE_ALL_OPEN', 'type' => GROUP_OPEN, 'negate' => false),
|
||||
14 => array('lang' => 'PRE_NOT_OPEN', 'type' => GROUP_OPEN, 'negate' => true),
|
||||
);
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'admin_roles':
|
||||
$permission_type = 'a_';
|
||||
$this->page_title = 'ACP_ADMIN_ROLES';
|
||||
break;
|
||||
|
||||
case 'user_roles':
|
||||
$permission_type = 'u_';
|
||||
$this->page_title = 'ACP_USER_ROLES';
|
||||
break;
|
||||
|
||||
case 'mod_roles':
|
||||
$permission_type = 'm_';
|
||||
$this->page_title = 'ACP_MOD_ROLES';
|
||||
break;
|
||||
|
||||
case 'forum_roles':
|
||||
$permission_type = 'f_';
|
||||
$this->page_title = 'ACP_FORUM_ROLES';
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error('INVALID_MODE');
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang[$this->page_title],
|
||||
'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'])
|
||||
);
|
||||
|
||||
// Take action... admin submitted something
|
||||
if ($submit || $action == 'remove')
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'remove':
|
||||
|
||||
if (!$role_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$role_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$role_row)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$this->remove_role($role_id);
|
||||
|
||||
add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_REMOVED', $role_row['role_name']);
|
||||
trigger_error($user->lang['ROLE_DELETED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, 'DELETE_ROLE', build_hidden_fields(array(
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'role_id' => $role_id,
|
||||
'action' => $action,
|
||||
)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
if (!$role_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
// Get role we edit
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$role_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$role_row)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
case 'add':
|
||||
|
||||
$role_name = request_var('role_name', '');
|
||||
$role_group_ids = request_var('role_group_ids', array(0));
|
||||
$pre_select = request_var('pre_select', 'custom');
|
||||
$auth_settings = request_var('setting', array('' => 0));
|
||||
|
||||
if (!$role_name)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
// Adjust group array if we have a pre-selection
|
||||
if ($pre_select != 'custom')
|
||||
{
|
||||
$pre_select = (int) $pre_select;
|
||||
|
||||
if (!$pre_select || !isset($this->pre_selection_array[$pre_select]))
|
||||
{
|
||||
$role_group_ids = array(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
ORDER BY group_type DESC, group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$groups[$row['group_type']][$row['group_id']] = $row['group_name'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Build role_group_ids
|
||||
$role_group_ids = array();
|
||||
|
||||
$row = $this->pre_selection_array[$pre_select];
|
||||
|
||||
if (!$row['negate'] && !isset($row['name']))
|
||||
{
|
||||
foreach ($groups[$row['type']] as $group_id => $group_name)
|
||||
{
|
||||
$role_group_ids[] = $group_id;
|
||||
}
|
||||
}
|
||||
else if ($row['negate'] && !isset($row['name']))
|
||||
{
|
||||
$group_types = array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE);
|
||||
unset($group_types[array_search($row['type'], $group_types)]);
|
||||
|
||||
foreach ($group_types as $type)
|
||||
{
|
||||
foreach ($groups[$type] as $group_id => $group_name)
|
||||
{
|
||||
$role_group_ids[] = $group_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!$row['negate'] && isset($row['name']))
|
||||
{
|
||||
foreach ($groups[$row['type']] as $group_id => $group_name)
|
||||
{
|
||||
if (in_array($group_name, $row['name']))
|
||||
{
|
||||
$role_group_ids[] = $group_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($row['negate'] && isset($row['name']))
|
||||
{
|
||||
$group_types = array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE);
|
||||
|
||||
foreach ($group_types as $type)
|
||||
{
|
||||
foreach ($groups[$type] as $group_id => $group_name)
|
||||
{
|
||||
if ($type != $row['type'])
|
||||
{
|
||||
$role_group_ids[] = $group_id;
|
||||
}
|
||||
else if (!in_array($group_name, $row['name']))
|
||||
{
|
||||
$role_group_ids[] = $group_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if we add/edit a role we check the name to be unique among the settings...
|
||||
$sql = 'SELECT role_id
|
||||
FROM ' . ACL_ROLES_TABLE . "
|
||||
WHERE role_type = '" . $db->sql_escape($permission_type) . "'
|
||||
AND LOWER(role_name) = '" . $db->sql_escape(strtolower($role_name)) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Make sure we only print out the error if we add the role or change it's name
|
||||
if ($row && ($mode == 'add' || ($mode == 'edit' && strtolower($role_row['role_name']) != strtolower($role_name))))
|
||||
{
|
||||
trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
// If role_group_ids include "every user/group" we do not need to set it...
|
||||
if (in_array(0, $role_group_ids))
|
||||
{
|
||||
$role_group_ids = array(0);
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'role_name' => (string) $role_name,
|
||||
'role_type' => (string) $permission_type,
|
||||
'role_group_ids' => (string) implode(':', $role_group_ids),
|
||||
);
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$sql = 'UPDATE ' . ACL_ROLES_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$role_id = $db->sql_nextid();
|
||||
}
|
||||
|
||||
// Now add the auth settings
|
||||
$auth_admin->acl_set_role($role_id, $auth_settings);
|
||||
|
||||
add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name);
|
||||
|
||||
trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . adm_back_link($this->u_action));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Display screens
|
||||
switch ($action)
|
||||
{
|
||||
case 'add':
|
||||
|
||||
$options_from = request_var('options_from', 0);
|
||||
|
||||
$role_row = array(
|
||||
'role_name' => request_var('role_name', ''),
|
||||
'role_type' => $permission_type,
|
||||
'role_group_ids' => implode(':', request_var('role_group_ids', array(0))),
|
||||
);
|
||||
|
||||
if ($options_from)
|
||||
{
|
||||
$sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option
|
||||
FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o
|
||||
WHERE o.auth_option_id = p.auth_option_id
|
||||
AND p.role_id = ' . $options_from . '
|
||||
ORDER BY p.auth_option_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$auth_options = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$auth_options[$row['auth_option']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT auth_option_id, auth_option
|
||||
FROM ' . ACL_OPTIONS_TABLE . "
|
||||
WHERE auth_option LIKE '{$permission_type}%'
|
||||
AND auth_option <> '{$permission_type}'
|
||||
ORDER BY auth_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$auth_options = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$auth_options[$row['auth_option']] = ACL_UNSET;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
case 'edit':
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
if (!$role_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$role_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option
|
||||
FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o
|
||||
WHERE o.auth_option_id = p.auth_option_id
|
||||
AND p.role_id = ' . $role_id . '
|
||||
ORDER BY p.auth_option_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$auth_options = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$auth_options[$row['auth_option']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!$role_row)
|
||||
{
|
||||
trigger_error($user->lang['NO_PRESET_SELECTED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
// Build group options array (with pre-selection)
|
||||
$s_preselect_options = $s_group_options = array();
|
||||
$this->build_group_options($role_row['role_group_ids'], $s_preselect_options, $s_group_options);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'S_PRESELECT_OPTIONS' => $s_preselect_options,
|
||||
'S_GROUP_OPTIONS' => $s_group_options,
|
||||
|
||||
'U_ACTION' => $this->u_action . "&action={$action}&role_id={$role_id}",
|
||||
'U_BACK' => $this->u_action,
|
||||
|
||||
'ROLE_NAME' => $role_row['role_name'],
|
||||
'L_ACL_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
|
||||
)
|
||||
);
|
||||
|
||||
// We need to fill the auth options array with ACL_UNSET options ;)
|
||||
$sql = 'SELECT auth_option_id, auth_option
|
||||
FROM ' . ACL_OPTIONS_TABLE . "
|
||||
WHERE auth_option LIKE '{$permission_type}%'
|
||||
AND auth_option <> '{$permission_type}'
|
||||
ORDER BY auth_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!isset($auth_options[$row['auth_option']]))
|
||||
{
|
||||
$auth_options[$row['auth_option']] = ACL_UNSET;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Unset global permission option
|
||||
unset($auth_options[$permission_type]);
|
||||
|
||||
// Display auth options
|
||||
$this->display_auth_options($auth_options);
|
||||
|
||||
// Get users/groups/forums using this preset...
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$hold_ary = $auth_admin->get_role_mask($role_id);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
{
|
||||
$template->assign_var('S_DISPLAY_ROLE_MASK', true);
|
||||
$auth_admin->display_role_mask($hold_ary);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
// Select existing roles
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . "
|
||||
WHERE role_type = '" . $db->sql_escape($permission_type) . "'
|
||||
ORDER BY role_name ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$roles = $groups = $group_ids = $group_info = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$roles[] = $row;
|
||||
if ($row['role_group_ids'])
|
||||
{
|
||||
$groups[$row['role_id']] = explode(':', $row['role_group_ids']);
|
||||
$group_ids = array_merge($group_ids, $groups[$row['role_id']]);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($group_ids))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_type, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id IN (' . implode(', ', array_map('intval', $group_ids)) . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$group_info[$row['group_id']] = array(
|
||||
'group_name' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
|
||||
'group_special' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$s_role_options = '';
|
||||
foreach ($roles as $row)
|
||||
{
|
||||
$template->assign_block_vars('roles', array(
|
||||
'NAME' => $row['role_name'],
|
||||
|
||||
'S_GROUP' => ($row['role_group_ids']) ? true : false,
|
||||
|
||||
'U_EDIT' => $this->u_action . '&action=edit&role_id=' . $row['role_id'],
|
||||
'U_REMOVE' => $this->u_action . '&action=remove&role_id=' . $row['role_id'],
|
||||
'U_DISPLAY_ITEMS' => $this->u_action . '&display_item=' . $row['role_id'] . '#assigned_to')
|
||||
);
|
||||
|
||||
if (isset($groups[$row['role_id']]) && sizeof($groups[$row['role_id']]))
|
||||
{
|
||||
foreach ($groups[$row['role_id']] as $group_id)
|
||||
{
|
||||
$template->assign_block_vars('roles.groups', array(
|
||||
'S_SPECIAL_GROUP' => $group_info[$group_id]['group_special'],
|
||||
'GROUP_NAME' => $group_info[$group_id]['group_name'],
|
||||
'U_GROUP' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=group&g=$group_id")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$s_role_options .= '<option value="' . $row['role_id'] . '">' . $row['role_name'] . '</option>';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_ROLE_OPTIONS' => $s_role_options)
|
||||
);
|
||||
|
||||
// Display assigned items?
|
||||
$display_item = request_var('display_item', 0);
|
||||
|
||||
if ($display_item)
|
||||
{
|
||||
$template->assign_var('S_DISPLAY_ROLE_MASK', true);
|
||||
|
||||
$hold_ary = $auth_admin->get_role_mask($display_item);
|
||||
$auth_admin->display_role_mask($hold_ary);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display permission settings able to be set
|
||||
*/
|
||||
function display_auth_options($auth_options)
|
||||
{
|
||||
global $template, $user;
|
||||
|
||||
$content_array = $categories = array();
|
||||
$key_sort_array = array(0);
|
||||
$auth_options = array(0 => $auth_options);
|
||||
|
||||
// Making use of auth_admin method here (we do not really want to change two similar code fragments)
|
||||
auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
|
||||
|
||||
$content_array = $content_array[0];
|
||||
|
||||
$template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
|
||||
|
||||
// Assign to template
|
||||
foreach ($content_array as $cat => $cat_array)
|
||||
{
|
||||
$template->assign_block_vars('auth', array(
|
||||
'CAT_NAME' => $user->lang['permission_cat'][$cat],
|
||||
'S_YES' => $cat_array['S_YES'],
|
||||
'S_NO' => $cat_array['S_NO'],
|
||||
'S_UNSET' => $cat_array['S_UNSET'])
|
||||
);
|
||||
|
||||
foreach ($cat_array['permissions'] as $permission => $allowed)
|
||||
{
|
||||
$template->assign_block_vars('auth.mask', array(
|
||||
'S_YES' => ($allowed == ACL_YES) ? true : false,
|
||||
'S_NO' => ($allowed == ACL_NO) ? true : false,
|
||||
'S_UNSET' => ($allowed == ACL_UNSET) ? true : false,
|
||||
|
||||
'FIELD_NAME' => $permission,
|
||||
'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build user-friendly group options
|
||||
*/
|
||||
function build_group_options($role_group_ids, &$s_preselect_options, &$s_group_options)
|
||||
{
|
||||
global $db, $user, $template;
|
||||
|
||||
$groups = $selected_groups = array();
|
||||
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
ORDER BY group_type DESC, group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$groups = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$groups[$row['group_type']][$row['group_id']] = $row['group_name'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$selected_group_ids = explode(':', $role_group_ids);
|
||||
|
||||
// First of all, build the group options for the custom interface...
|
||||
$s_group_options = '';
|
||||
foreach ($groups as $group_type => $group_row)
|
||||
{
|
||||
foreach ($group_row as $group_id => $group_name)
|
||||
{
|
||||
if (in_array($group_id, $selected_group_ids))
|
||||
{
|
||||
$selected_groups[$group_type][$group_id] = $group_name;
|
||||
}
|
||||
$s_group_options .= '<option value="' . $group_id . '"' . ((in_array($group_id, $selected_group_ids)) ? ' selected="selected"' : '') . (($group_type == GROUP_SPECIAL) ? ' class="sep"' : '') . '>' . (($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name) . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
// Build preselect array...
|
||||
$one_selected_item = false;
|
||||
|
||||
$s_preselect_options = '<option value="0"' . ((!$role_group_ids) ? ' selected="selected"' : '') . '>' . $user->lang['EVERY_USER_GROUP'] . '</option>';
|
||||
if (!$role_group_ids)
|
||||
{
|
||||
$one_selected_item = true;
|
||||
}
|
||||
|
||||
// Build pre-selection dropdown field
|
||||
foreach ($this->pre_selection_array as $option_id => $row)
|
||||
{
|
||||
if (!$row['negate'] && !isset($row['name']))
|
||||
{
|
||||
$s_selected = false;
|
||||
if (sizeof($selected_groups) == 1 && isset($selected_groups[$row['type']]) && sizeof($selected_groups[$row['type']]) == sizeof($groups[$row['type']]))
|
||||
{
|
||||
$s_selected = true;
|
||||
}
|
||||
}
|
||||
else if ($row['negate'] && !isset($row['name']))
|
||||
{
|
||||
$group_types = array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE);
|
||||
unset($group_types[array_search($row['type'], $group_types)]);
|
||||
|
||||
$s_selected = true;
|
||||
if (isset($selected_groups[$row['type']]))
|
||||
{
|
||||
$s_selected = false;
|
||||
}
|
||||
|
||||
foreach ($group_types as $type)
|
||||
{
|
||||
if (!isset($selected_groups[$type]) || sizeof($selected_groups[$type]) != sizeof($groups[$type]))
|
||||
{
|
||||
$s_selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!$row['negate'] && isset($row['name']))
|
||||
{
|
||||
$s_selected = false;
|
||||
if (sizeof($selected_groups) == 1 && isset($selected_groups[$row['type']]) && sizeof($selected_groups[$row['type']]) == sizeof($row['name']))
|
||||
{
|
||||
$s_selected = true;
|
||||
|
||||
foreach ($row['name'] as $name)
|
||||
{
|
||||
if (!in_array($name, $selected_groups[$row['type']]))
|
||||
{
|
||||
$s_selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($row['negate'] && isset($row['name']))
|
||||
{
|
||||
$group_types = array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE);
|
||||
unset($group_types[array_search($row['type'], $group_types)]);
|
||||
|
||||
$s_selected = true;
|
||||
if (isset($selected_groups[$row['type']]))
|
||||
{
|
||||
foreach ($row['name'] as $name)
|
||||
{
|
||||
if (in_array($name, $selected_groups[$row['type']]))
|
||||
{
|
||||
$s_selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($group_types as $type)
|
||||
{
|
||||
if (!isset($selected_groups[$type]) || sizeof($selected_groups[$type]) != sizeof($groups[$type]))
|
||||
{
|
||||
$s_selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_selected)
|
||||
{
|
||||
$one_selected_item = true;
|
||||
}
|
||||
|
||||
$s_preselect_options .= '<option value="' . $option_id . '"' . (($s_selected) ? ' selected="selected"' : '') . '>' . $user->lang[$row['lang']] . '</option>';
|
||||
}
|
||||
|
||||
$s_preselect_options .= '<option value="custom"' . ((!$one_selected_item) ? ' selected="selected"' : '') . '>' . $user->lang['CUSTOM'] . '</option>';
|
||||
|
||||
$template->assign_var('S_CUSTOM_GROUP_IDS', ($one_selected_item) ? false : true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove role
|
||||
*/
|
||||
function remove_role($role_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$auth_admin = new auth_admin();
|
||||
|
||||
// First of all, get the role auth settings we need to re-set...
|
||||
$sql = 'SELECT o.auth_option, r.auth_setting
|
||||
FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o
|
||||
WHERE o.auth_option_id = r.auth_option_id
|
||||
AND r.role_id = ' . $role_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$auth_settings = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$auth_settings[$row['auth_option']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Get role assignments
|
||||
$hold_ary = $auth_admin->get_role_mask($role_id);
|
||||
|
||||
// Remove role from users and groups
|
||||
$sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
|
||||
WHERE auth_role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE auth_role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Re-assign permisisons
|
||||
foreach ($hold_ary as $forum_id => $forum_ary)
|
||||
{
|
||||
if (isset($forum_ary['users']))
|
||||
{
|
||||
$auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings);
|
||||
}
|
||||
|
||||
if (isset($forum_ary['groups']))
|
||||
{
|
||||
$auth_admin->acl_set('group', $forum_id, $forum_ary['users'], $auth_settings);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove role data and role
|
||||
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . ACL_ROLES_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class acp_permission_roles_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_permission_roles',
|
||||
'title' => 'ACP_PERMISSION_ROLES',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'admin_roles' => array('title' => 'ACP_ADMIN_ROLES', 'auth' => 'acl_a_roles'),
|
||||
'user_roles' => array('title' => 'ACP_USER_ROLES', 'auth' => 'acl_a_roles'),
|
||||
'mod_roles' => array('title' => 'ACP_MOD_ROLES', 'auth' => 'acl_a_roles'),
|
||||
'forum_roles' => array('title' => 'ACP_FORUM_ROLES', 'auth' => 'acl_a_roles'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -38,11 +38,14 @@ class acp_permissions
|
||||
$action = (isset($_POST['psubmit'])) ? 'apply_permissions' : $action;
|
||||
|
||||
$all_forums = request_var('all_forums', 0);
|
||||
$user_id = request_var('user_id', array(0));
|
||||
$group_id = request_var('group_id', array(0));
|
||||
$subforum_id = request_var('subforum_id', 0);
|
||||
$forum_id = request_var('forum_id', array(0));
|
||||
|
||||
$username = request_var('username', array(''));
|
||||
$usernames = request_var('usernames', '');
|
||||
$user_id = request_var('user_id', array(0));
|
||||
|
||||
$group_id = request_var('group_id', array(0));
|
||||
|
||||
// Map usernames to ids and vice versa
|
||||
if ($usernames)
|
||||
@ -62,11 +65,45 @@ class acp_permissions
|
||||
}
|
||||
unset($username);
|
||||
|
||||
// Build forum ids (of all forums are checked or subforum listing used)
|
||||
if ($all_forums)
|
||||
{
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
ORDER BY left_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forum_id = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id[] = $row['forum_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else if ($subforum_id)
|
||||
{
|
||||
$forum_id = array();
|
||||
foreach (get_forum_branch($subforum_id, 'children') as $row)
|
||||
{
|
||||
$forum_id[] = $row['forum_id'];
|
||||
}
|
||||
}
|
||||
|
||||
// Define some common variables for every mode
|
||||
$error = array();
|
||||
|
||||
$permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local';
|
||||
|
||||
// Showing introductionary page?
|
||||
if ($mode == 'intro')
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_INTRO' => true)
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'setting_user_global':
|
||||
@ -168,11 +205,6 @@ class acp_permissions
|
||||
'type' => $permission_type)
|
||||
);
|
||||
|
||||
if ($all_forums)
|
||||
{
|
||||
$s_hidden_fields .= build_hidden_fields(array('all_forums' => $all_forums));
|
||||
}
|
||||
|
||||
// Go through the screens/options needed and present them in correct order
|
||||
foreach ($permission_victim as $victim)
|
||||
{
|
||||
@ -195,19 +227,28 @@ class acp_permissions
|
||||
|
||||
case 'forums':
|
||||
|
||||
if (sizeof($forum_id) || $all_forums)
|
||||
if (sizeof($forum_id))
|
||||
{
|
||||
if (sizeof($forum_id))
|
||||
{
|
||||
$this->check_existence('forum', $forum_id);
|
||||
}
|
||||
|
||||
$this->check_existence('forum', $forum_id);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
$forum_list = make_forum_select(false, false, false, false, true, true);
|
||||
|
||||
// Build forum options
|
||||
$s_forum_options = '';
|
||||
foreach ($forum_list as $f_id => $f_row)
|
||||
{
|
||||
$s_forum_options .= '<option value="' . $f_id . '"' . $f_row['selected'] . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
|
||||
}
|
||||
|
||||
// Build subforum options
|
||||
$s_subforum_options = $this->build_subforum_options($forum_list);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SELECT_FORUM' => true,
|
||||
'S_FORUM_OPTIONS' => make_forum_select(false, false, false),
|
||||
'S_FORUM_OPTIONS' => $s_forum_options,
|
||||
'S_SUBFORUM_OPTIONS' => $s_subforum_options,
|
||||
'S_FORUM_ALL' => true,
|
||||
'S_FORUM_MULTIPLE' => true)
|
||||
);
|
||||
@ -263,29 +304,33 @@ class acp_permissions
|
||||
}
|
||||
|
||||
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND a.forum_id IN (' . implode(', ', $forum_id) . ')' : 'AND a.forum_id <> 0');
|
||||
$sql_permission_option = "o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
|
||||
$sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
|
||||
|
||||
$sql = 'SELECT DISTINCT u.user_id, u.username
|
||||
FROM ' . USERS_TABLE . ' u, ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o
|
||||
WHERE $sql_permission_option
|
||||
FROM (' . USERS_TABLE . ' u, ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . ' o)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . " r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
||||
$sql_permission_option
|
||||
$sql_forum_id
|
||||
AND a.auth_option_id = o.auth_option_id
|
||||
AND u.user_id = a.user_id
|
||||
ORDER BY u.username, u.user_regdate ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$s_defined_user_options = '';
|
||||
$defined_user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$s_defined_user_options .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
|
||||
$defined_user_ids[] = $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT DISTINCT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g, ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o
|
||||
WHERE $sql_permission_option
|
||||
FROM (' . GROUPS_TABLE . ' g, ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . ' o)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . " r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (a.auth_option_id = o.auth_option_id OR r.auth_option_id = o.auth_option_id)
|
||||
$sql_permission_option
|
||||
$sql_forum_id
|
||||
AND a.auth_option_id = o.auth_option_id
|
||||
AND g.group_id = a.group_id
|
||||
ORDER BY g.group_type DESC, g.group_name ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
@ -299,6 +344,22 @@ class acp_permissions
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Now we check the users... because the "all"-selection is different here (all defined users/groups)
|
||||
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||
|
||||
if ($all_users && sizeof($defined_user_ids))
|
||||
{
|
||||
$user_id = $defined_user_ids;
|
||||
continue 2;
|
||||
}
|
||||
|
||||
if ($all_groups && sizeof($defined_group_ids))
|
||||
{
|
||||
$group_id = $defined_group_ids;
|
||||
continue 2;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false,
|
||||
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
|
||||
@ -346,12 +407,6 @@ class acp_permissions
|
||||
return;
|
||||
}
|
||||
|
||||
// Set to all forums if selected
|
||||
if ($permission_scope == 'local' && $all_forums)
|
||||
{
|
||||
$forum_id = array();
|
||||
}
|
||||
|
||||
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
|
||||
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
|
||||
{
|
||||
@ -386,6 +441,45 @@ class acp_permissions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build +subforum options
|
||||
*/
|
||||
function build_subforum_options($forum_list)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$s_options = '';
|
||||
|
||||
$forum_list = array_merge($forum_list);
|
||||
|
||||
foreach ($forum_list as $key => $row)
|
||||
{
|
||||
$s_options .= '<option value="' . $row['forum_id'] . '"' . $row['selected'] . '>' . $row['padding'] . $row['forum_name'];
|
||||
|
||||
// We check if a branch is there...
|
||||
$branch_there = false;
|
||||
|
||||
foreach (array_slice($forum_list, $key + 1) as $temp_row)
|
||||
{
|
||||
if ($temp_row['left_id'] > $row['left_id'] && $temp_row['left_id'] < $row['right_id'])
|
||||
{
|
||||
$branch_there = true;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($branch_there)
|
||||
{
|
||||
$s_options .= ' [' . $user->lang['PLUS_SUBFORUMS'] . ']';
|
||||
}
|
||||
|
||||
$s_options .= '</option>';
|
||||
}
|
||||
|
||||
return $s_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build dropdown field for changing permission types
|
||||
*/
|
||||
@ -476,9 +570,12 @@ class acp_permissions
|
||||
|
||||
$auth_settings = array_map('intval', $_POST['setting'][$ug_id][$forum_id]);
|
||||
|
||||
// Do the admin want to set these permissions to other forums too?
|
||||
// Do we have a role we want to set?
|
||||
$assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0;
|
||||
|
||||
// Do the admin want to set these permissions to other items too?
|
||||
$inherit = request_var('inherit', array(0));
|
||||
|
||||
|
||||
$ug_id = array($ug_id);
|
||||
$forum_id = array($forum_id);
|
||||
|
||||
@ -499,8 +596,17 @@ class acp_permissions
|
||||
|
||||
$forum_id = array_unique($forum_id);
|
||||
|
||||
// If the auth settings differ from the assigned role, then do not set a role...
|
||||
if ($assigned_role)
|
||||
{
|
||||
if (!$this->check_assigned_role($assigned_role, $auth_settings))
|
||||
{
|
||||
$assigned_role = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the permission set...
|
||||
$auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_settings);
|
||||
$auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_settings, $assigned_role);
|
||||
|
||||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
@ -549,8 +655,20 @@ class acp_permissions
|
||||
$forum_id = (int) $forum_id;
|
||||
$forum_ids[] = $forum_id;
|
||||
|
||||
// Check role...
|
||||
$assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0;
|
||||
|
||||
// If the auth settings differ from the assigned role, then do not set a role...
|
||||
if ($assigned_role)
|
||||
{
|
||||
if (!$this->check_assigned_role($assigned_role, $auth_options))
|
||||
{
|
||||
$assigned_role = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the permission set...
|
||||
$auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_options);
|
||||
$auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_options, $assigned_role);
|
||||
}
|
||||
}
|
||||
|
||||
@ -571,6 +689,44 @@ class acp_permissions
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare auth settings with auth settings from role
|
||||
* returns false if they differ, true if they are equal
|
||||
*/
|
||||
function check_assigned_role($role_id, &$auth_settings)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT o.auth_option, r.auth_setting
|
||||
FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_ROLES_DATA_TABLE . ' r
|
||||
WHERE o.auth_option_id = r.auth_option_id
|
||||
AND r.role_id = ' . $role_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$test_auth_settings = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$test_auth_settings[$row['auth_option']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// We need to add any ACL_UNSET setting from auth_settings to compare correctly
|
||||
foreach ($auth_settings as $option => $setting)
|
||||
{
|
||||
if ($setting == ACL_UNSET)
|
||||
{
|
||||
$test_auth_settings[$option] = $setting;
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof(array_diff_assoc($auth_settings, $test_auth_settings)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove permissions
|
||||
*/
|
||||
@ -708,6 +864,8 @@ class acp_permissions_info
|
||||
'title' => 'ACP_PERMISSIONS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'intro' => array('title' => 'ACP_PERMISSIONS', 'auth' => 'acl_a_authusers || acl_a_authgroups || acl_a_viewauth'),
|
||||
|
||||
'setting_user_global' => array('title' => 'ACP_USERS_PERMISSIONS', 'auth' => 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'),
|
||||
'setting_user_local' => array('title' => 'ACP_USERS_FORUM_PERMISSIONS', 'auth' => 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'),
|
||||
'setting_group_global' => array('title' => 'ACP_GROUPS_PERMISSIONS', 'auth' => 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'),
|
||||
|
@ -166,19 +166,19 @@ class auth_admin extends auth
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permission mask for presets
|
||||
* This function only supports getting masks for one preset
|
||||
* Get permission mask for roles
|
||||
* This function only supports getting masks for one role
|
||||
*/
|
||||
function get_preset_mask($preset_id)
|
||||
function get_role_mask($role_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$hold_ary = array();
|
||||
|
||||
// Get users having this preset set...
|
||||
// Get users having this role set...
|
||||
$sql = 'SELECT user_id, forum_id
|
||||
FROM ' . ACL_USERS_TABLE . '
|
||||
WHERE auth_preset_id = ' . $preset_id . '
|
||||
WHERE auth_role_id = ' . $role_id . '
|
||||
ORDER BY forum_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@ -191,7 +191,7 @@ class auth_admin extends auth
|
||||
// Now grab groups...
|
||||
$sql = 'SELECT group_id, forum_id
|
||||
FROM ' . ACL_GROUPS_TABLE . '
|
||||
WHERE auth_preset_id = ' . $preset_id . '
|
||||
WHERE auth_role_id = ' . $role_id . '
|
||||
ORDER BY forum_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@ -261,6 +261,49 @@ class auth_admin extends auth
|
||||
$forum_names_ary[0] = $l_acl_type;
|
||||
}
|
||||
|
||||
// Get available roles
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . "
|
||||
WHERE role_type = '" . $db->sql_escape($permission_type) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$roles = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$roles[$row['role_id']] = $row;
|
||||
$roles[$row['role_id']]['groups'] = ($row['role_group_ids']) ? explode(':', $row['role_group_ids']) : array();
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$cur_roles = $this->acl_role_data($user_mode, $permission_type, array_keys($hold_ary));
|
||||
|
||||
// Build js roles array (role data assignments)
|
||||
$s_role_js_array = '';
|
||||
|
||||
if (sizeof($roles))
|
||||
{
|
||||
$sql = 'SELECT r.role_id, o.auth_option, r.auth_setting
|
||||
FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o
|
||||
WHERE o.auth_option_id = r.auth_option_id
|
||||
AND r.role_id IN (' . implode(', ', array_keys($roles)) . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$s_role_js_array = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!isset($s_role_js_array[$row['role_id']]))
|
||||
{
|
||||
$s_role_js_array[$row['role_id']] = "\n" . 'role_options[' . $row['role_id'] . '] = new Array();' . "\n";
|
||||
}
|
||||
$s_role_js_array[$row['role_id']] .= 'role_options[' . $row['role_id'] . '][\'' . $row['auth_option'] . '\'] = ' . $row['auth_setting'] . '; ';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$s_role_js_array = implode('', $s_role_js_array);
|
||||
}
|
||||
|
||||
$template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
|
||||
|
||||
// Now obtain memberships
|
||||
$user_groups_default = $user_groups_custom = array();
|
||||
if ($user_mode == 'user' && $group_display)
|
||||
@ -293,9 +336,10 @@ class auth_admin extends auth
|
||||
unset($memberships, $groups);
|
||||
}
|
||||
|
||||
// If we only have one forum id to display, we switch the complete interface to group by user/usergroup instead of grouping by forum
|
||||
// If we only have one forum id to display or being in local mode and more than one user/group to display,
|
||||
// we switch the complete interface to group by user/usergroup instead of grouping by forum
|
||||
// To achive this, we need to switch the array a bit
|
||||
if (sizeof($forum_ids) == 1)
|
||||
if (sizeof($forum_ids) == 1 || ($local && sizeof($ug_names_ary) > 1))
|
||||
{
|
||||
$hold_ary_temp = $hold_ary;
|
||||
$hold_ary = array();
|
||||
@ -330,10 +374,28 @@ class auth_admin extends auth
|
||||
|
||||
foreach ($content_array as $ug_id => $ug_array)
|
||||
{
|
||||
// Build role dropdown options
|
||||
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
|
||||
|
||||
$s_role_options = '';
|
||||
foreach ($roles as $role_id => $role_row)
|
||||
{
|
||||
if ($role_id == $current_role_id || !sizeof($role_row['groups']) || ($user_mode == 'group' && in_array($ug_id, $role_row['groups'])))
|
||||
{
|
||||
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . '>' . $role_row['role_name'] . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_role_options)
|
||||
{
|
||||
$s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_ROLE'] . '</option>' . $s_role_options;
|
||||
}
|
||||
|
||||
$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
|
||||
'NAME' => $ug_names_ary[$ug_id],
|
||||
'UG_ID' => $ug_id,
|
||||
'FORUM_ID' => $forum_id)
|
||||
'NAME' => $ug_names_ary[$ug_id],
|
||||
'S_ROLE_OPTIONS' => $s_role_options,
|
||||
'UG_ID' => $ug_id,
|
||||
'FORUM_ID' => $forum_id)
|
||||
);
|
||||
|
||||
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id);
|
||||
@ -371,11 +433,29 @@ class auth_admin extends auth
|
||||
|
||||
foreach ($content_array as $forum_id => $forum_array)
|
||||
{
|
||||
// Build role dropdown options
|
||||
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
|
||||
|
||||
$s_role_options = '';
|
||||
foreach ($roles as $role_id => $role_row)
|
||||
{
|
||||
if ($role_id == $current_role_id || !sizeof($role_row['groups']) || ($user_mode == 'group' && in_array($ug_id, $role_row['groups'])))
|
||||
{
|
||||
$s_role_options .= '<option value="' . $role_id . '"' . (($role_id == $current_role_id) ? ' selected="selected"' : '') . '>' . $role_row['role_name'] . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_role_options)
|
||||
{
|
||||
$s_role_options = '<option value="0"' . ((!$current_role_id) ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_ROLE'] . '</option>' . $s_role_options;
|
||||
}
|
||||
|
||||
$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
|
||||
'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
|
||||
'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
|
||||
'UG_ID' => $ug_id,
|
||||
'FORUM_ID' => $forum_id)
|
||||
'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
|
||||
'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
|
||||
'S_ROLE_OPTIONS' => $s_role_options,
|
||||
'UG_ID' => $ug_id,
|
||||
'FORUM_ID' => $forum_id)
|
||||
);
|
||||
|
||||
$this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id);
|
||||
@ -385,9 +465,9 @@ class auth_admin extends auth
|
||||
}
|
||||
|
||||
/**
|
||||
* Display permission mask for presets
|
||||
* Display permission mask for roles
|
||||
*/
|
||||
function display_preset_mask(&$hold_ary)
|
||||
function display_role_mask(&$hold_ary)
|
||||
{
|
||||
global $db, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID;
|
||||
|
||||
@ -411,7 +491,7 @@ class auth_admin extends auth
|
||||
|
||||
foreach ($hold_ary as $forum_id => $auth_ary)
|
||||
{
|
||||
$template->assign_block_vars('preset_mask', array(
|
||||
$template->assign_block_vars('role_mask', array(
|
||||
'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_names[$forum_id],
|
||||
'FORUM_ID' => $forum_id)
|
||||
);
|
||||
@ -426,7 +506,7 @@ class auth_admin extends auth
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('preset_mask.users', array(
|
||||
$template->assign_block_vars('role_mask.users', array(
|
||||
'USER_ID' => $row['user_id'],
|
||||
'USERNAME' => $row['username'],
|
||||
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['user_id']}")
|
||||
@ -445,7 +525,7 @@ class auth_admin extends auth
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('preset_mask.groups', array(
|
||||
$template->assign_block_vars('role_mask.groups', array(
|
||||
'GROUP_ID' => $row['group_id'],
|
||||
'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'],
|
||||
'U_PROFILE' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=group&g={$row['group_id']}")
|
||||
@ -566,7 +646,7 @@ class auth_admin extends auth
|
||||
/**
|
||||
* Set a user or group ACL record
|
||||
*/
|
||||
function acl_set($ug_type, &$forum_id, &$ug_id, &$auth)
|
||||
function acl_set($ug_type, &$forum_id, &$ug_id, &$auth, $role_id = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@ -599,120 +679,70 @@ class auth_admin extends auth
|
||||
$ug_id_sql = 'IN (' . implode(', ', array_map('intval', $ug_id)) . ')';
|
||||
$forum_sql = 'IN (' . implode(', ', array_map('intval', $forum_id)) . ') ';
|
||||
|
||||
// Set any flags as required
|
||||
foreach ($auth as $auth_option => $setting)
|
||||
{
|
||||
$flag = substr($auth_option, 0, strpos($auth_option, '_') + 1);
|
||||
|
||||
if (!isset($auth[$flag]) || !$auth[$flag])
|
||||
{
|
||||
$auth[$flag] = $setting;
|
||||
}
|
||||
}
|
||||
|
||||
if ($ug_type == 'user')
|
||||
{
|
||||
$sql = 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting
|
||||
FROM ' . ACL_USERS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o
|
||||
WHERE a.auth_option_id = o.auth_option_id
|
||||
AND a.forum_id $forum_sql
|
||||
AND a.user_id $ug_id_sql";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT o.auth_option_id, o.auth_option, a.forum_id, a.auth_setting
|
||||
FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " o
|
||||
WHERE a.auth_option_id = o.auth_option_id
|
||||
AND a.forum_id $forum_sql
|
||||
AND a.group_id $ug_id_sql";
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$cur_auth = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$cur_auth[$row['forum_id']][$row['auth_option_id']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Instead of updating, inserting, removing we just remove all current settings and re-set everything...
|
||||
$table = ($ug_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
|
||||
$id_field = $ug_type . '_id';
|
||||
|
||||
// Remove current auth options...
|
||||
$sql = "DELETE FROM $table
|
||||
WHERE forum_id $forum_sql
|
||||
AND $id_field $ug_id_sql";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
foreach ($forum_id as $forum)
|
||||
{
|
||||
$forum = (int) $forum;
|
||||
|
||||
foreach ($auth as $auth_option => $setting)
|
||||
if ($role_id)
|
||||
{
|
||||
$auth_option_id = (int) $this->option_ids[$auth_option];
|
||||
|
||||
switch ($setting)
|
||||
foreach ($ug_id as $id)
|
||||
{
|
||||
case ACL_UNSET:
|
||||
if (isset($cur_auth[$forum][$auth_option_id]))
|
||||
{
|
||||
$sql_ary['delete'][] = "DELETE FROM $table
|
||||
WHERE forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id
|
||||
AND $id_field $ug_id_sql";
|
||||
}
|
||||
break;
|
||||
$sql_ary[] = array(
|
||||
$id_field => (int) $id,
|
||||
'forum_id' => (int) $forum,
|
||||
'auth_option_id' => 0,
|
||||
'auth_setting' => 0,
|
||||
'auth_role_id' => $role_id
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($auth as $auth_option => $setting)
|
||||
{
|
||||
$auth_option_id = (int) $this->option_ids[$auth_option];
|
||||
|
||||
default:
|
||||
if (!isset($cur_auth[$forum][$auth_option_id]))
|
||||
if ($setting != ACL_UNSET)
|
||||
{
|
||||
foreach ($ug_id as $id)
|
||||
{
|
||||
foreach ($ug_id as $id)
|
||||
{
|
||||
$sql_ary['insert'][] = array(
|
||||
$id_field => (int) $id,
|
||||
'forum_id' => (int) $forum,
|
||||
'auth_option_id' => (int) $auth_option_id,
|
||||
'auth_setting' => (int) $setting
|
||||
);
|
||||
}
|
||||
$sql_ary[] = array(
|
||||
$id_field => (int) $id,
|
||||
'forum_id' => (int) $forum,
|
||||
'auth_option_id' => (int) $auth_option_id,
|
||||
'auth_setting' => (int) $setting
|
||||
);
|
||||
}
|
||||
else if ($cur_auth[$forum][$auth_option_id] != $setting)
|
||||
{
|
||||
$sql_ary['update'][] = "UPDATE $table
|
||||
SET auth_setting = " . (int) $setting . "
|
||||
WHERE $id_field $ug_id_sql
|
||||
AND forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($cur_auth);
|
||||
|
||||
foreach ($sql_ary as $sql_type => $sql_subary)
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
switch ($sql_type)
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'insert':
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('MULTI_INSERT', $sql_subary));
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach ($sql_subary as $ary)
|
||||
{
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('MULTI_INSERT', $sql_ary));
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
case 'delete':
|
||||
foreach ($sql_subary as $sql)
|
||||
default:
|
||||
foreach ($sql_ary as $ary)
|
||||
{
|
||||
$db->sql_query($sql);
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -722,9 +752,9 @@ class auth_admin extends auth
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a preset ACL record
|
||||
* Set a role-specific ACL record
|
||||
*/
|
||||
function acl_set_preset($preset_id, &$auth)
|
||||
function acl_set_role($role_id, &$auth)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@ -742,97 +772,40 @@ class auth_admin extends auth
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Set any flags as required
|
||||
foreach ($auth as $auth_option => $setting)
|
||||
{
|
||||
$flag = substr($auth_option, 0, strpos($auth_option, '_') + 1);
|
||||
|
||||
if (!isset($auth[$flag]) || !$auth[$flag])
|
||||
{
|
||||
$auth[$flag] = $setting;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT auth_option_id, auth_setting
|
||||
FROM ' . ACL_PRESETS_DATA_TABLE . '
|
||||
WHERE preset_id = ' . $preset_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$cur_auth = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$cur_auth[$row['auth_option_id']] = $row['auth_setting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
// Remove current auth options...
|
||||
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql_ary = array();
|
||||
|
||||
foreach ($auth as $auth_option => $setting)
|
||||
{
|
||||
$auth_option_id = (int) $this->option_ids[$auth_option];
|
||||
|
||||
switch ($setting)
|
||||
if ($setting != ACL_UNSET)
|
||||
{
|
||||
case ACL_UNSET:
|
||||
if (isset($cur_auth[$auth_option_id]))
|
||||
{
|
||||
$sql_ary['delete'][] = 'DELETE FROM ' . ACL_PRESETS_DATA_TABLE . '
|
||||
WHERE auth_option_id = ' . $auth_option_id . '
|
||||
AND preset_id = ' . $preset_id;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!isset($cur_auth[$auth_option_id]))
|
||||
{
|
||||
$sql_ary['insert'][] = array(
|
||||
'preset_id' => (int) $preset_id,
|
||||
'auth_option_id' => (int) $auth_option_id,
|
||||
'auth_setting' => (int) $setting
|
||||
);
|
||||
}
|
||||
else if ($cur_auth[$auth_option_id] != $setting)
|
||||
{
|
||||
$sql_ary['update'][] = 'UPDATE ' . ACL_PRESETS_DATA_TABLE . '
|
||||
SET auth_setting = ' . (int) $setting . '
|
||||
WHERE preset_id = ' . $preset_id . '
|
||||
AND auth_option_id = ' . $auth_option_id;
|
||||
}
|
||||
break;
|
||||
$sql_ary[] = array(
|
||||
'role_id' => (int) $role_id,
|
||||
'auth_option_id' => (int) $auth_option_id,
|
||||
'auth_setting' => (int) $setting
|
||||
);
|
||||
}
|
||||
}
|
||||
unset($cur_auth);
|
||||
|
||||
foreach ($sql_ary as $sql_type => $sql_subary)
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
switch ($sql_type)
|
||||
{
|
||||
case 'insert':
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query('INSERT INTO ' . ACL_PRESETS_DATA_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_subary));
|
||||
break;
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$db->sql_query('INSERT INTO ' . ACL_ROLES_DATA_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $sql_ary));
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach ($sql_subary as $ary)
|
||||
{
|
||||
$db->sql_query('INSERT INTO ' . ACL_PRESETS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
case 'delete':
|
||||
foreach ($sql_subary as $sql)
|
||||
{
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
foreach ($sql_ary as $ary)
|
||||
{
|
||||
$db->sql_query('INSERT INTO ' . ACL_ROLES_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $ary));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$this->acl_clear_prefetch();
|
||||
@ -840,6 +813,7 @@ class auth_admin extends auth
|
||||
|
||||
/**
|
||||
* Remove local permission
|
||||
* @todo take roles into consideration (if one auth option is being removed and placed within a role we need to re-build the acl entries)
|
||||
*/
|
||||
function acl_delete($mode, $ug_id = false, $forum_id = false, $auth_id = false)
|
||||
{
|
||||
|
@ -353,7 +353,7 @@ class auth
|
||||
if (sizeof($hold_ary))
|
||||
{
|
||||
ksort($hold_ary);
|
||||
|
||||
|
||||
$last_f = 0;
|
||||
|
||||
foreach ($hold_ary as $f => $auth_ary)
|
||||
@ -378,7 +378,7 @@ class auth
|
||||
}
|
||||
else
|
||||
{
|
||||
$bitstring[$id] = 0;
|
||||
$bitstring[$id] = ACL_NO;
|
||||
}
|
||||
}
|
||||
|
||||
@ -427,6 +427,39 @@ class auth
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assigned roles
|
||||
*/
|
||||
function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$roles = array();
|
||||
|
||||
$sql_id = ($user_type == 'user') ? 'user_id' : 'group_id';
|
||||
|
||||
$sql_ug = ($ug_id !== false) ? ((!is_array($ug_id)) ? "AND a.$sql_id = $ug_id" : "AND a.$sql_id IN (" . implode(', ', $ug_id) . ')') : '';
|
||||
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND a.forum_id IN (' . implode(', ', $forum_id) . ')') : '';
|
||||
|
||||
// Grab assigned roles...
|
||||
$sql = 'SELECT a.auth_role_id, a.' . $sql_id . ', a.forum_id
|
||||
FROM ' . (($user_type == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE) . ' a, ' . ACL_ROLES_TABLE . " r
|
||||
WHERE a.auth_role_id = r.role_id
|
||||
AND r.role_type = '" . $db->sql_escape($role_type) . "'
|
||||
$sql_ug
|
||||
$sql_forum
|
||||
ORDER BY r.role_name ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$roles[$row[$sql_id]][$row['forum_id']] = $row['auth_role_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get raw acl data based on user/option/forum
|
||||
*/
|
||||
@ -455,37 +488,41 @@ class auth
|
||||
|
||||
// First grab user settings ... each user has only one setting for each
|
||||
// option ... so we shouldn't need any ACL_NO checks ... he says ...
|
||||
$sql = 'SELECT ao.auth_option, a.user_id, a.forum_id, a.auth_setting
|
||||
FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_USERS_TABLE . ' a
|
||||
WHERE ao.auth_option_id = a.auth_option_id
|
||||
$sql = 'SELECT ao.auth_option, a.auth_role_id, r.auth_setting as role_auth_setting, a.user_id, a.forum_id, a.auth_setting
|
||||
FROM (' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_USERS_TABLE . ' a)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . ' r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
|
||||
' . (($sql_user) ? 'AND a.' . $sql_user : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
ORDER BY a.forum_id, ao.auth_option_id";
|
||||
ORDER BY a.forum_id, ao.auth_option";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
|
||||
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $setting;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Now grab group settings ... ACL_NO overrides ACL_YES so act appropriatley
|
||||
$sql = 'SELECT ug.user_id, ao.auth_option, a.forum_id, a.auth_setting
|
||||
FROM ' . USER_GROUP_TABLE . ' ug, ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_GROUPS_TABLE . ' a
|
||||
WHERE ao.auth_option_id = a.auth_option_id
|
||||
$sql = 'SELECT ug.user_id, ao.auth_option, a.forum_id, a.auth_setting, a.auth_role_id, r.auth_setting as role_auth_setting
|
||||
FROM (' . USER_GROUP_TABLE . ' ug, ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_GROUPS_TABLE . ' a)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . ' r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
|
||||
AND a.group_id = ug.group_id
|
||||
' . (($sql_user) ? 'AND ug.' . $sql_user : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
ORDER BY a.forum_id, ao.auth_option_id";
|
||||
ORDER BY a.forum_id, ao.auth_option";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) || (isset($hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']]) && $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] != ACL_NO))
|
||||
{
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
|
||||
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $setting;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@ -519,20 +556,21 @@ class auth
|
||||
|
||||
$hold_ary = array();
|
||||
|
||||
// Grab user settings ... each user has only one setting for each
|
||||
// option ... so we shouldn't need any ACL_NO checks ... he says ...
|
||||
$sql = 'SELECT ao.auth_option, a.user_id, a.forum_id, a.auth_setting
|
||||
FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_USERS_TABLE . ' a
|
||||
WHERE ao.auth_option_id = a.auth_option_id
|
||||
// Grab user settings...
|
||||
$sql = 'SELECT ao.auth_option, a.auth_role_id, r.auth_setting as role_auth_setting, a.user_id, a.forum_id, a.auth_setting
|
||||
FROM (' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_USERS_TABLE . ' a)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . ' r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
|
||||
' . (($sql_user) ? 'AND a.' . $sql_user : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
ORDER BY a.forum_id, ao.auth_option_id";
|
||||
ORDER BY a.forum_id, ao.auth_option";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
|
||||
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
|
||||
$hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $setting;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -564,18 +602,20 @@ class auth
|
||||
$hold_ary = array();
|
||||
|
||||
// Grab group settings...
|
||||
$sql = 'SELECT a.group_id, ao.auth_option, a.forum_id, a.auth_setting
|
||||
FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_GROUPS_TABLE . ' a
|
||||
WHERE ao.auth_option_id = a.auth_option_id
|
||||
$sql = 'SELECT a.group_id, ao.auth_option, a.forum_id, a.auth_setting, a.auth_role_id, r.auth_setting as role_auth_setting
|
||||
FROM (' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_GROUPS_TABLE . ' a)
|
||||
LEFT JOIN ' . ACL_ROLES_DATA_TABLE . ' r ON (a.auth_role_id = r.role_id)
|
||||
WHERE (ao.auth_option_id = a.auth_option_id OR ao.auth_option_id = r.auth_option_id)
|
||||
' . (($sql_group) ? 'AND a.' . $sql_group : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
ORDER BY a.forum_id, ao.auth_option_id";
|
||||
ORDER BY a.forum_id, ao.auth_option";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$hold_ary[$row['group_id']][$row['forum_id']][$row['auth_option']] = $row['auth_setting'];
|
||||
$setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting'];
|
||||
$hold_ary[$row['group_id']][$row['forum_id']][$row['auth_option']] = $setting;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -117,8 +117,8 @@ define('FIELD_DATE', 6);
|
||||
// Table names
|
||||
define('ACL_GROUPS_TABLE', $table_prefix.'auth_groups');
|
||||
define('ACL_OPTIONS_TABLE', $table_prefix.'auth_options');
|
||||
define('ACL_PRESETS_TABLE', $table_prefix.'auth_presets');
|
||||
define('ACL_PRESETS_DATA_TABLE', $table_prefix.'auth_preset_data');
|
||||
define('ACL_ROLES_TABLE', $table_prefix.'auth_roles');
|
||||
define('ACL_ROLES_DATA_TABLE', $table_prefix.'auth_roles_data');
|
||||
define('ACL_USERS_TABLE', $table_prefix.'auth_users');
|
||||
define('ATTACHMENTS_TABLE', $table_prefix.'attachments');
|
||||
define('BANLIST_TABLE', $table_prefix.'banlist');
|
||||
|
@ -130,6 +130,7 @@ class dbal
|
||||
}
|
||||
else if (is_array($var) && is_string($var[0]))
|
||||
{
|
||||
// This is used for INSERT_SELECT(s)
|
||||
$values[] = $var[0];
|
||||
}
|
||||
else
|
||||
|
@ -2219,7 +2219,7 @@ function get_backtrace()
|
||||
|
||||
case 'string':
|
||||
$argument = htmlspecialchars(substr($argument, 0, 64)) . ((strlen($argument) > 64) ? '...' : '');
|
||||
$args[] = '"' . $argument . '"';
|
||||
$args[] = "'{$argument}'";
|
||||
break;
|
||||
|
||||
case 'array':
|
||||
|
@ -1869,11 +1869,11 @@ function cache_moderators()
|
||||
*/
|
||||
function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC')
|
||||
{
|
||||
global $db, $user, $auth, $phpEx, $SID, $phpbb_root_path;
|
||||
global $db, $user, $auth, $phpEx, $SID, $phpbb_root_path, $phpbb_admin_path;
|
||||
|
||||
$topic_id_list = $is_auth = $is_mod = array();
|
||||
|
||||
$profile_url = (defined('IN_ADMIN')) ? "{$phpbb_root_path}index.$phpEx$SID&i=users&mode=overview" : "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile";
|
||||
$profile_url = (defined('IN_ADMIN')) ? "{$phpbb_admin_path}index.$phpEx$SID&i=users&mode=overview" : "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile";
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
|
@ -938,7 +938,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// forum notification is sent to those not receiving post notification
|
||||
if ($topic_notification)
|
||||
if ($forum_notification)
|
||||
{
|
||||
if (sizeof($notify_rows))
|
||||
{
|
||||
@ -1037,10 +1037,10 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'EMAIL_SIG' => $email_sig,
|
||||
'SITENAME' => $config['sitename'],
|
||||
'USERNAME' => $addr['name'],
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'FORUM_NAME' => $forum_name,
|
||||
'SITENAME' => html_entity_decode($config['sitename']),
|
||||
'USERNAME' => html_entity_decode($addr['name']),
|
||||
'TOPIC_TITLE' => html_entity_decode($topic_title),
|
||||
'FORUM_NAME' => html_entity_decode($forum_name),
|
||||
|
||||
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&e=0",
|
||||
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&e=0",
|
||||
|
@ -1172,7 +1172,7 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
|
||||
* Add or edit a group. If we're editing a group we only update user
|
||||
* parameters such as rank, etc. if they are changed
|
||||
*/
|
||||
function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
function group_create(&$group_id, $type, $name, $desc, $group_attributes)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user, $file_upload;
|
||||
|
||||
@ -1228,9 +1228,17 @@ function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
}
|
||||
}
|
||||
|
||||
// Setting the log message before we set the group id (if group gets added)
|
||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||
|
||||
$sql = ($group_id) ? 'UPDATE ' . GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE group_id = $group_id" : 'INSERT INTO ' . GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
$group_id = $db->sql_nextid();
|
||||
}
|
||||
|
||||
// Set user attributes
|
||||
$sql_ary = array();
|
||||
if (sizeof($group_attributes))
|
||||
@ -1251,7 +1259,6 @@ function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||
add_log('admin', $log, $name);
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
'U_APPROVE_ACTION' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&p=$post_id",
|
||||
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_ip', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_CHGPOSTER' => $auth->acl_get('m_', $post_info['forum_id']),
|
||||
'S_CAN_LOCK_POST' => $auth->acl_get('m_lock', $post_info['forum_id']),
|
||||
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
|
||||
@ -182,7 +182,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
}
|
||||
|
||||
// Get IP
|
||||
if ($auth->acl_get('m_ip', $post_info['forum_id']))
|
||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||
{
|
||||
$rdns_ip_num = request_var('rdns', '');
|
||||
|
||||
|
@ -104,7 +104,7 @@ class mcp_queue
|
||||
'S_MCP_QUEUE' => true,
|
||||
'S_APPROVE_ACTION' => "mcp.$phpEx$SID&i=queue&p=$post_id&f=$forum_id",
|
||||
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_ip', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
|
||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||
|
@ -1063,6 +1063,10 @@ class parse_message extends bbcode_firstpass
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!function_exists('delete_attachments'))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
delete_attachments('attach', array(intval($this->attachment_data[$index]['attach_id'])));
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,10 @@ class ucp_attachments
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
if (!function_exists('delete_attachments'))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
delete_attachments('attach', $delete_ids);
|
||||
|
||||
$refresh_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id";
|
||||
|
@ -27,7 +27,7 @@ CREATE TABLE phpbb_auth_groups (
|
||||
group_id INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_option_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_preset_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_role_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_setting INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
@ -40,17 +40,17 @@ CREATE TABLE phpbb_auth_options (
|
||||
founder_only INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
# phpbb_auth_presets
|
||||
CREATE TABLE phpbb_auth_presets (
|
||||
preset_id INTEGER NOT NULL,
|
||||
preset_name VARCHAR(50) NOT NULL,
|
||||
preset_type VARCHAR(10) NOT NULL,
|
||||
preset_group_id INTEGER DEFAULT 0 NOT NULL
|
||||
# phpbb_auth_roles
|
||||
CREATE TABLE phpbb_auth_roles (
|
||||
role_id INTEGER NOT NULL,
|
||||
role_name VARCHAR(50) NOT NULL,
|
||||
role_type VARCHAR(10) NOT NULL,
|
||||
role_group_ids VARCHAR(255) NOT NULL
|
||||
);;
|
||||
|
||||
# phpbb_auth_preset_data
|
||||
CREATE TABLE phpbb_auth_preset_data (
|
||||
preset_id INTEGER DEFAULT 0 NOT NULL,
|
||||
# phpbb_auth_roles_data
|
||||
CREATE TABLE phpbb_auth_roles_data (
|
||||
role_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_option_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_setting INTEGER DEFAULT 0 NOT NULL
|
||||
);
|
||||
@ -60,7 +60,7 @@ CREATE TABLE phpbb_auth_users (
|
||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||
forum_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_option_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_preset_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_role_id INTEGER DEFAULT 0 NOT NULL,
|
||||
auth_setting INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
@ -878,19 +878,19 @@ ON phpbb_auth_options(
|
||||
auth_option
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_auth_presets
|
||||
ALTER TABLE phpbb_auth_roles
|
||||
ADD PRIMARY KEY (
|
||||
preset_id
|
||||
role_id
|
||||
);;
|
||||
|
||||
CREATE INDEX preset_type10
|
||||
ON phpbb_auth_presets(
|
||||
preset_type
|
||||
CREATE INDEX role_type10
|
||||
ON phpbb_auth_roles(
|
||||
role_type
|
||||
);;
|
||||
|
||||
ALTER TABLE phpbb_auth_preset_data
|
||||
ALTER TABLE phpbb_auth_roles_data
|
||||
ADD PRIMARY KEY (
|
||||
preset_id,
|
||||
role_id,
|
||||
auth_option_id
|
||||
);;
|
||||
|
||||
@ -1476,9 +1476,9 @@ CREATE GENERATOR b_auth_optionsauth_option_idGen;;
|
||||
|
||||
SET GENERATOR b_auth_optionsauth_option_idGen TO 0;;
|
||||
|
||||
CREATE GENERATOR G_auth_presetspreset_idGen;;
|
||||
CREATE GENERATOR G_auth_rolesrole_idGen;;
|
||||
|
||||
SET GENERATOR G_auth_presetspreset_idGen TO 0;;
|
||||
SET GENERATOR G_auth_rolesrole_idGen TO 0;;
|
||||
|
||||
CREATE GENERATOR G_phpbb_banlistban_idGen3;;
|
||||
|
||||
@ -1614,11 +1614,11 @@ BEGIN
|
||||
NEW.auth_option_id = GEN_ID(b_auth_optionsauth_option_idGen, 1);
|
||||
END;;
|
||||
|
||||
CREATE TRIGGER t_phpbb_auth_presetspreset_idGe FOR phpbb_auth_presets
|
||||
CREATE TRIGGER t_phpbb_auth_rolesrole_idGe FOR phpbb_auth_roles
|
||||
BEFORE INSERT
|
||||
AS
|
||||
BEGIN
|
||||
NEW.preset_id = GEN_ID(G_auth_presetspreset_idGen, 1);
|
||||
NEW.role_id = GEN_ID(G_auth_rolesrole_idGen, 1);
|
||||
END;;
|
||||
|
||||
CREATE TRIGGER GetNextG_phpbb_banlistban_idGen FOR phpbb_banlist
|
||||
|
@ -32,7 +32,7 @@ CREATE TABLE [phpbb_auth_groups] (
|
||||
[group_id] [int] NOT NULL ,
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[auth_option_id] [int] NOT NULL ,
|
||||
[auth_preset_id] [int] NOT NULL ,
|
||||
[auth_role_id] [int] NOT NULL ,
|
||||
[auth_setting] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
@ -46,16 +46,16 @@ CREATE TABLE [phpbb_auth_options] (
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_auth_presets] (
|
||||
[preset_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[preset_name] [varchar] (50) NOT NULL ,
|
||||
[preset_type] [varchar] (10) NOT NULL ,
|
||||
[preset_group_id] [int] NOT NULL
|
||||
CREATE TABLE [phpbb_auth_roles] (
|
||||
[role_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[role_name] [varchar] (50) NOT NULL ,
|
||||
[role_type] [varchar] (10) NOT NULL ,
|
||||
[role_group_ids] [varchar] (255) NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_auth_preset_data] (
|
||||
[preset_id] [int] NOT NULL ,
|
||||
CREATE TABLE [phpbb_auth_roles_data] (
|
||||
[role_id] [int] NOT NULL ,
|
||||
[auth_option_id] [int] NOT NULL ,
|
||||
[auth_setting] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
@ -65,7 +65,7 @@ CREATE TABLE [phpbb_auth_users] (
|
||||
[user_id] [int] NOT NULL ,
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[auth_option_id] [int] NOT NULL ,
|
||||
[auth_preset_id] [int] NOT NULL ,
|
||||
[auth_role_id] [int] NOT NULL ,
|
||||
[auth_setting] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
@ -846,17 +846,17 @@ ALTER TABLE [phpbb_auth_options] WITH NOCHECK ADD
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_auth_presets] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_auth_presets] PRIMARY KEY CLUSTERED
|
||||
ALTER TABLE [phpbb_auth_roles] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_auth_roles] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[preset_id]
|
||||
[role_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_auth_preset_data] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_auth_preset_data] PRIMARY KEY CLUSTERED
|
||||
ALTER TABLE [phpbb_auth_roles_data] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_auth_roles_data] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[preset_id],
|
||||
[role_id],
|
||||
[auth_option_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
@ -1203,12 +1203,12 @@ ALTER TABLE [phpbb_auth_options] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_auth_o_founder_only] DEFAULT (0) FOR [founder_only]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_auth_presets] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_auth_p_preset_group_id] DEFAULT (0) FOR [preset_group_id]
|
||||
ALTER TABLE [phpbb_auth_roles] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_auth_p_role_group_ids] DEFAULT ('') FOR [role_group_ids]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_auth_preset_data] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_auth_d_preset_id] DEFAULT (0) FOR [preset_id],
|
||||
ALTER TABLE [phpbb_auth_roles_data] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_auth_d_role_id] DEFAULT (0) FOR [role_id],
|
||||
CONSTRAINT [DF_auth_d_auth_option_id] DEFAULT (0) FOR [auth_option_id],
|
||||
CONSTRAINT [DF_auth_d_auth_setting] DEFAULT (0) FOR [auth_setting]
|
||||
GO
|
||||
@ -1677,7 +1677,7 @@ GO
|
||||
CREATE INDEX [auth_option] ON [phpbb_auth_options]([auth_option]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [preset_type] ON [phpbb_auth_presets]([preset_type]) ON [PRIMARY]
|
||||
CREATE INDEX [role_type] ON [phpbb_auth_roles]([role_type]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [user_id] ON [phpbb_auth_users]([user_id]) ON [PRIMARY]
|
||||
|
@ -34,7 +34,7 @@ CREATE TABLE phpbb_auth_groups (
|
||||
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_preset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
|
||||
KEY group_id (group_id),
|
||||
KEY auth_option_id (auth_option_id)
|
||||
@ -51,22 +51,22 @@ CREATE TABLE phpbb_auth_options (
|
||||
KEY auth_option (auth_option)
|
||||
);
|
||||
|
||||
# Table: phpbb_auth_presets
|
||||
CREATE TABLE phpbb_auth_presets (
|
||||
preset_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
preset_name varchar(50) DEFAULT '' NOT NULL,
|
||||
preset_type varchar(10) DEFAULT '' NOT NULL,
|
||||
preset_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (preset_id),
|
||||
KEY preset_type (preset_type)
|
||||
# Table: phpbb_auth_roles
|
||||
CREATE TABLE phpbb_auth_roles (
|
||||
role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
role_name varchar(50) DEFAULT '' NOT NULL,
|
||||
role_type varchar(10) DEFAULT '' NOT NULL,
|
||||
role_group_ids varchar(255) UNSIGNED DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (role_id),
|
||||
KEY role_type (role_type)
|
||||
);
|
||||
|
||||
# Table: phpbb_auth_preset_data
|
||||
CREATE TABLE phpbb_auth_preset_data (
|
||||
preset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
# Table: phpbb_auth_roles_data
|
||||
CREATE TABLE phpbb_auth_roles_data (
|
||||
role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (preset_id, auth_option_id)
|
||||
PRIMARY KEY (role_id, auth_option_id)
|
||||
);
|
||||
|
||||
# Table: phpbb_auth_users
|
||||
@ -74,7 +74,7 @@ CREATE TABLE phpbb_auth_users (
|
||||
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_preset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
|
||||
KEY user_id (user_id),
|
||||
KEY auth_option_id (auth_option_id)
|
||||
|
@ -96,7 +96,7 @@ CREATE TABLE phpbb_auth_groups (
|
||||
group_id number(8) DEFAULT '0' NOT NULL,
|
||||
forum_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_option_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_preset_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_role_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_setting number(4) DEFAULT '0' NOT NULL
|
||||
)
|
||||
/
|
||||
@ -138,43 +138,43 @@ CREATE INDEX auth_option on phpbb_auth_options (auth_option)
|
||||
/
|
||||
|
||||
/*
|
||||
Table: phpbb_auth_presets
|
||||
Table: phpbb_auth_roles
|
||||
*/
|
||||
CREATE TABLE phpbb_auth_presets (
|
||||
preset_id number(8) NOT NULL,
|
||||
preset_name varchar2(50) DEFAULT '',
|
||||
preset_type varchar2(10) DEFAULT '',
|
||||
preset_group_id number(8) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_auth_presets PRIMARY KEY (preset_id)
|
||||
CREATE TABLE phpbb_auth_roles (
|
||||
role_id number(8) NOT NULL,
|
||||
role_name varchar2(50) DEFAULT '',
|
||||
role_type varchar2(10) DEFAULT '',
|
||||
role_group_ids varchar2(255) DEFAULT '' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_auth_roles PRIMARY KEY (role_id)
|
||||
)
|
||||
/
|
||||
|
||||
CREATE SEQUENCE sq_phpbb_auth_presets_preset_i
|
||||
CREATE SEQUENCE sq_phpbb_auth_roles_role_i
|
||||
/
|
||||
|
||||
CREATE OR REPLACE TRIGGER ai_phpbb_auth_presets_preset_i
|
||||
BEFORE INSERT ON phpbb_auth_presets
|
||||
CREATE OR REPLACE TRIGGER ai_phpbb_auth_roles_role_i
|
||||
BEFORE INSERT ON phpbb_auth_roles
|
||||
FOR EACH ROW WHEN (
|
||||
new.preset_id IS NULL OR new.preset_id = 0
|
||||
new.role_id IS NULL OR new.role_id = 0
|
||||
)
|
||||
BEGIN
|
||||
SELECT sq_phpbb_auth_presets_preset_i.nextval
|
||||
INTO :new.preset_id
|
||||
SELECT sq_phpbb_auth_roles_role_i.nextval
|
||||
INTO :new.role_id
|
||||
FROM dual;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE INDEX preset_type on phpbb_auth_presets (preset_type)
|
||||
CREATE INDEX role_type on phpbb_auth_roles (role_type)
|
||||
/
|
||||
|
||||
/*
|
||||
Table: phpbb_auth_preset_data
|
||||
Table: phpbb_auth_roles_data
|
||||
*/
|
||||
CREATE TABLE phpbb_auth_preset_data (
|
||||
preset_id number(8) DEFAULT '0' NOT NULL,
|
||||
CREATE TABLE phpbb_auth_roles_data (
|
||||
role_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_option_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_setting number(4) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT pk_phpbb_confirm PRIMARY KEY (preset_id, auth_option_id)
|
||||
CONSTRAINT pk_phpbb_confirm PRIMARY KEY (role_id, auth_option_id)
|
||||
)
|
||||
/
|
||||
|
||||
@ -185,7 +185,7 @@ CREATE TABLE phpbb_auth_users (
|
||||
user_id number(8) DEFAULT '0' NOT NULL,
|
||||
forum_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_option_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_preset_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_role_id number(8) DEFAULT '0' NOT NULL,
|
||||
auth_setting number(4) DEFAULT '0' NOT NULL
|
||||
)
|
||||
/
|
||||
|
@ -49,7 +49,7 @@ CREATE TABLE phpbb_auth_groups (
|
||||
group_id INT4 DEFAULT '0' NOT NULL,
|
||||
forum_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_option_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_preset_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_role_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_setting INT2 DEFAULT '0' NOT NULL
|
||||
);
|
||||
|
||||
@ -72,27 +72,27 @@ CREATE INDEX auth_option_phpbb_auth_options_index ON phpbb_auth_options (auth_op
|
||||
|
||||
SELECT SETVAL('phpbb_auth_options_auth_opti',(select case when max(auth_option_id)>0 then max(auth_option_id)+1 else 1 end from phpbb_auth_options));
|
||||
|
||||
/* Table: phpbb_auth_presets */
|
||||
CREATE SEQUENCE phpbb_auth_presets_preset_id;
|
||||
/* Table: phpbb_auth_roles */
|
||||
CREATE SEQUENCE phpbb_auth_roles_role_id;
|
||||
|
||||
CREATE TABLE phpbb_auth_presets (
|
||||
preset_id INT4 DEFAULT nextval('phpbb_auth_presets_preset_id'),
|
||||
preset_name varchar(50) DEFAULT '' NOT NULL,
|
||||
preset_type varchar(10) DEFAULT '' NOT NULL,
|
||||
preset_group_id INT4 DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (preset_id)
|
||||
CREATE TABLE phpbb_auth_roles (
|
||||
role_id INT4 DEFAULT nextval('phpbb_auth_roles_role_id'),
|
||||
role_name varchar(50) DEFAULT '' NOT NULL,
|
||||
role_type varchar(10) DEFAULT '' NOT NULL,
|
||||
role_group_ids varchar(255) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (role_id)
|
||||
);
|
||||
|
||||
CREATE INDEX preset_type_phpbb_auth_presets_index ON phpbb_auth_presets (preset_type);
|
||||
CREATE INDEX role_type_phpbb_auth_roles_index ON phpbb_auth_roles (role_type);
|
||||
|
||||
SELECT SETVAL('phpbb_auth_presets_preset_id',(select case when max(preset_id)>0 then max(preset_id)+1 else 1 end from phpbb_auth_presets));
|
||||
SELECT SETVAL('phpbb_auth_roles_role_id',(select case when max(role_id)>0 then max(role_id)+1 else 1 end from phpbb_auth_roles));
|
||||
|
||||
/* Table: phpbb_auth_preset_data */
|
||||
CREATE TABLE phpbb_auth_preset_data (
|
||||
preset_id INT4 DEFAULT '0' NOT NULL,
|
||||
/* Table: phpbb_auth_roles_data */
|
||||
CREATE TABLE phpbb_auth_roles_data (
|
||||
role_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_option_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_setting INT2 DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (preset_id, auth_option_id)
|
||||
PRIMARY KEY (role_id, auth_option_id)
|
||||
);
|
||||
|
||||
/* Table: phpbb_auth_users */
|
||||
@ -100,7 +100,7 @@ CREATE TABLE phpbb_auth_users (
|
||||
user_id INT4 DEFAULT '0' NOT NULL,
|
||||
forum_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_option_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_preset_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_role_id INT4 DEFAULT '0' NOT NULL,
|
||||
auth_setting INT2 DEFAULT '0' NOT NULL
|
||||
);
|
||||
|
||||
|
@ -239,17 +239,16 @@ INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_report', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local) VALUES ('f_subscribe', 1);
|
||||
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_edit', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_delete', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_lock', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_merge', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_approve', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_unrate', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_auth', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_ip', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_chgposter', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_delete', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_edit', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_info', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_lock', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_merge', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_warn', 1, 1);
|
||||
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_aauth', 1);
|
||||
@ -281,6 +280,7 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_phpinfo', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_profile', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_prune', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_ranks', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_roles', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_server', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_styles', 1);
|
||||
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_uauth', 1);
|
||||
@ -471,104 +471,119 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class,
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (90, 1, 'pm', 'ucp', 0, 27, 98, 99, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg');
|
||||
|
||||
# ACP
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (2, 1, '', 'acp', 1, 0, 197, 232, 'ACP_CAT_GENERAL', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (7, 1, 'modules', 'acp', 1, 67, 383, 384, 'ACP', 'acp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (11, 1, '', 'acp', 1, 0, 267, 310, 'ACP_CAT_USERGROUP', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (41, 1, 'main', 'acp', 1, 2, 198, 199, 'ACP_MAIN', 'main', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (42, 1, '', 'acp', 1, 2, 200, 211, 'ACP_GENERAL_CONFIGURATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (43, 1, '', 'acp', 1, 2, 212, 219, 'ACP_CLIENT_COMMUNICATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (44, 1, '', 'acp', 1, 2, 220, 231, 'ACP_SERVER_CONFIGURATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (46, 1, '', 'acp', 1, 0, 233, 242, 'ACP_CAT_FORUMS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (47, 1, '', 'acp', 1, 0, 243, 266, 'ACP_CAT_POSTING', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (48, 1, '', 'acp', 1, 0, 311, 344, 'ACP_CAT_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (49, 1, '', 'acp', 1, 0, 345, 358, 'ACP_CAT_STYLES', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (50, 1, '', 'acp', 1, 0, 359, 370, 'ACP_CAT_MAINTANENCE', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (51, 1, '', 'acp', 1, 0, 371, 390, 'ACP_CAT_SYSTEM', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (52, 1, '', 'acp', 1, 0, 391, 392, 'ACP_CAT_DOT_MODS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (53, 1, '', 'acp', 1, 46, 234, 239, 'ACP_CAT_FORUMS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (54, 1, '', 'acp', 1, 46, 240, 241, 'ACP_CAT_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (56, 1, '', 'acp', 1, 47, 256, 265, 'ACP_ATTACHMENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (57, 1, '', 'acp', 1, 11, 268, 293, 'ACP_CAT_USERS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (58, 1, '', 'acp', 1, 11, 294, 297, 'ACP_GROUPS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (59, 1, '', 'acp', 1, 11, 298, 309, 'ACP_USER_SECURITY', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (61, 1, '', 'acp', 1, 48, 312, 329, 'ACP_PERMISSION_SETTINGS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (62, 1, '', 'acp', 1, 49, 346, 349, 'ACP_STYLE_MANAGEMENT', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (63, 1, '', 'acp', 1, 50, 360, 367, 'ACP_FORUM_LOGS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (64, 1, '', 'acp', 1, 50, 368, 369, 'ACP_CAT_DATABASE', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (65, 1, '', 'acp', 1, 51, 372, 373, 'ACP_AUTOMATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (66, 1, '', 'acp', 1, 51, 374, 381, 'ACP_GENERAL_TASKS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (67, 1, '', 'acp', 1, 51, 382, 389, 'ACP_MODULE_MANAGEMENT', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (69, 1, 'modules', 'acp', 1, 67, 385, 386, 'UCP', 'ucp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (71, 1, 'board', 'acp', 1, 42, 201, 202, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (72, 1, 'board', 'acp', 1, 42, 203, 204, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (73, 1, 'board', 'acp', 1, 42, 205, 206, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (74, 1, 'attachments', 'acp', 1, 42, 207, 208, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (75, 1, '', 'acp', 1, 47, 244, 255, 'ACP_MESSAGES', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (76, 1, 'attachments', 'acp', 1, 56, 257, 258, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 259, 260, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 261, 262, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 263, 264, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 209, 210, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 213, 214, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 215, 216, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 217, 218, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 221, 222, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 223, 224, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 225, 226, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (89, 1, 'php_info', 'acp', 1, 44, 227, 228, 'ACP_PHP_INFO', 'info', 'acl_a_phpinfo');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (91, 1, 'bots', 'acp', 1, 44, 229, 230, 'ACP_BOTS', 'bots', 'acl_a_bots');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 387, 388, 'MCP', 'mcp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 245, 246, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 247, 248, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 249, 250, 'ACP_ICONS', 'icons', 'acl_a_icons');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 251, 252, 'ACP_SMILIES', 'smilies', 'acl_a_icons');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (97, 1, 'words', 'acp', 1, 75, 253, 254, 'ACP_WORDS', 'words', 'acl_a_words');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (98, 1, 'logs', 'acp', 1, 63, 361, 362, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (99, 1, 'logs', 'acp', 1, 63, 363, 364, 'ACP_MOD_LOGS', 'mod', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (100, 1, 'logs', 'acp', 1, 63, 365, 366, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (101, 1, 'language', 'acp', 1, 66, 375, 376, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_language');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (102, 1, 'bots', 'acp', 1, 66, 377, 378, 'ACP_BOTS', 'bots', 'acl_a_bots');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (103, 1, 'groups', 'acp', 1, 58, 295, 296, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (105, 1, 'email', 'acp', 1, 66, 379, 380, 'ACP_MASS_EMAIL', 'email', 'acl_a_email');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (106, 1, 'ranks', 'acp', 1, 57, 273, 274, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (107, 1, 'ban', 'acp', 1, 59, 303, 304, 'ACP_BAN_EMAILS', 'email', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (108, 1, 'ban', 'acp', 1, 59, 305, 306, 'ACP_BAN_IPS', 'ip', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (109, 1, 'ban', 'acp', 1, 59, 307, 308, 'ACP_BAN_USERNAMES', 'user', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (110, 1, 'disallow', 'acp', 1, 59, 301, 302, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (111, 1, 'prune', 'acp', 1, 59, 299, 300, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (112, 1, 'prune', 'acp', 1, 53, 237, 238, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (113, 1, 'profile', 'acp', 1, 57, 271, 272, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_profile');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (114, 1, 'forums', 'acp', 1, 53, 235, 236, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (115, 1, 'users', 'acp', 1, 57, 269, 270, 'ACP_MANAGE_USERS', 'overview', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (116, 1, 'users', 'acp', 0, 57, 275, 276, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (117, 1, 'users', 'acp', 0, 57, 277, 278, 'ACP_USER_PROFILE', 'profile', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (118, 1, 'users', 'acp', 0, 57, 279, 280, 'ACP_USER_PREFS', 'prefs', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (119, 1, 'users', 'acp', 0, 57, 281, 282, 'ACP_USER_AVATAR', 'avatar', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (120, 1, 'users', 'acp', 0, 57, 285, 286, 'ACP_USER_SIG', 'sig', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (121, 1, 'users', 'acp', 0, 57, 287, 288, 'ACP_USER_GROUPS', 'groups', 'acl_a_user && acl_a_group');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (122, 1, 'users', 'acp', 0, 57, 289, 290, 'ACP_USER_PERM', 'perm', 'acl_a_user && acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (123, 1, 'users', 'acp', 0, 57, 291, 292, 'ACP_USER_ATTACH', 'attach', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (141, 1, '', 'acp', 1, 49, 350, 357, 'ACP_STYLE_COMPONENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (142, 1, 'styles', 'acp', 1, 62, 347, 348, 'ACP_STYLES', 'style', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (143, 1, 'styles', 'acp', 1, 141, 351, 352, 'ACP_TEMPLATES', 'template', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (144, 1, 'styles', 'acp', 1, 141, 353, 354, 'ACP_THEMES', 'theme', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (145, 1, 'styles', 'acp', 1, 141, 355, 356, 'ACP_IMAGESETS', 'imageset', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (147, 1, 'users', 'acp', 0, 57, 283, 284, 'ACP_USER_RANK', 'rank', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (148, 1, 'permissions', 'acp', 1, 61, 313, 314, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (149, 1, 'permissions', 'acp', 1, 61, 315, 316, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (150, 1, 'permissions', 'acp', 1, 61, 317, 318, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (151, 1, 'permissions', 'acp', 1, 61, 319, 320, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (152, 1, 'permissions', 'acp', 1, 61, 321, 322, 'ACP_ADMINISTRATORS', 'setting_admin_global', 'acl_a_aauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (155, 1, 'permissions', 'acp', 1, 61, 323, 324, 'ACP_GLOBAL_MODERATORS', 'setting_mod_global', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (156, 1, 'permissions', 'acp', 1, 61, 325, 326, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (157, 1, 'permissions', 'acp', 1, 61, 327, 328, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (158, 1, '', 'acp', 1, 48, 330, 341, 'ACP_PERMISSION_MASKS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (159, 1, 'permissions', 'acp', 1, 158, 331, 332, 'ACP_VIEW_ADMIN_PERMISSIONS', 'view_admin_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (160, 1, 'permissions', 'acp', 1, 158, 333, 334, 'ACP_VIEW_USER_PERMISSIONS', 'view_user_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (161, 1, 'permissions', 'acp', 1, 158, 335, 336, 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS', 'view_mod_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (162, 1, 'permissions', 'acp', 1, 158, 337, 338, 'ACP_VIEW_FORUM_MOD_PERMISSIONS', 'view_mod_local', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (163, 1, 'permissions', 'acp', 1, 158, 339, 340, 'ACP_VIEW_FORUM_PERMISSIONS', 'view_forum_local', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (165, 1, '', 'acp', 1, 48, 342, 343, 'Permission Presets', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (2, 1, '', 'acp', 1, 0, 227, 262, 'ACP_CAT_GENERAL', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (7, 1, 'modules', 'acp', 1, 67, 443, 444, 'ACP', 'acp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (11, 1, '', 'acp', 1, 0, 305, 356, 'ACP_CAT_USERGROUP', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (41, 1, 'main', 'acp', 1, 2, 228, 229, 'ACP_MAIN', 'main', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (42, 1, '', 'acp', 1, 2, 230, 241, 'ACP_GENERAL_CONFIGURATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (43, 1, '', 'acp', 1, 2, 242, 249, 'ACP_CLIENT_COMMUNICATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (44, 1, '', 'acp', 1, 2, 250, 261, 'ACP_SERVER_CONFIGURATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (46, 1, '', 'acp', 1, 0, 263, 280, 'ACP_CAT_FORUMS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (47, 1, '', 'acp', 1, 0, 281, 304, 'ACP_CAT_POSTING', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (48, 1, '', 'acp', 1, 0, 357, 404, 'ACP_CAT_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (49, 1, '', 'acp', 1, 0, 405, 418, 'ACP_CAT_STYLES', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (50, 1, '', 'acp', 1, 0, 419, 430, 'ACP_CAT_MAINTANENCE', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (51, 1, '', 'acp', 1, 0, 431, 450, 'ACP_CAT_SYSTEM', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (52, 1, '', 'acp', 1, 0, 451, 452, 'ACP_CAT_DOT_MODS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (53, 1, '', 'acp', 1, 46, 264, 269, 'ACP_CAT_FORUMS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (54, 1, '', 'acp', 1, 46, 270, 279, 'ACP_FORUM_BASED_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (56, 1, '', 'acp', 1, 47, 294, 303, 'ACP_ATTACHMENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (57, 1, '', 'acp', 1, 11, 306, 335, 'ACP_CAT_USERS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (58, 1, '', 'acp', 1, 11, 336, 343, 'ACP_GROUPS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (59, 1, '', 'acp', 1, 11, 344, 355, 'ACP_USER_SECURITY', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (61, 1, '', 'acp', 1, 48, 360, 365, 'ACP_BASIC_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (62, 1, '', 'acp', 1, 49, 406, 409, 'ACP_STYLE_MANAGEMENT', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (63, 1, '', 'acp', 1, 50, 420, 427, 'ACP_FORUM_LOGS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (64, 1, '', 'acp', 1, 50, 428, 429, 'ACP_CAT_DATABASE', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (65, 1, '', 'acp', 1, 51, 432, 433, 'ACP_AUTOMATION', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (66, 1, '', 'acp', 1, 51, 434, 441, 'ACP_GENERAL_TASKS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (67, 1, '', 'acp', 1, 51, 442, 449, 'ACP_MODULE_MANAGEMENT', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (69, 1, 'modules', 'acp', 1, 67, 445, 446, 'UCP', 'ucp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (71, 1, 'board', 'acp', 1, 42, 231, 232, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (72, 1, 'board', 'acp', 1, 42, 233, 234, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (73, 1, 'board', 'acp', 1, 42, 235, 236, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (74, 1, 'attachments', 'acp', 1, 42, 237, 238, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (75, 1, '', 'acp', 1, 47, 282, 293, 'ACP_MESSAGES', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (76, 1, 'attachments', 'acp', 1, 56, 295, 296, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (77, 1, 'attachments', 'acp', 1, 56, 297, 298, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (78, 1, 'attachments', 'acp', 1, 56, 299, 300, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (80, 1, 'attachments', 'acp', 1, 56, 301, 302, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (81, 1, 'board', 'acp', 1, 42, 239, 240, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (82, 1, 'board', 'acp', 1, 43, 243, 244, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (83, 1, 'board', 'acp', 1, 43, 245, 246, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (84, 1, 'jabber', 'acp', 1, 43, 247, 248, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (85, 1, 'board', 'acp', 1, 44, 251, 252, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (86, 1, 'board', 'acp', 1, 44, 253, 254, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (87, 1, 'board', 'acp', 1, 44, 255, 256, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (89, 1, 'php_info', 'acp', 1, 44, 257, 258, 'ACP_PHP_INFO', 'info', 'acl_a_phpinfo');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (91, 1, 'bots', 'acp', 1, 44, 259, 260, 'ACP_BOTS', 'bots', 'acl_a_bots');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (92, 1, 'modules', 'acp', 1, 67, 447, 448, 'MCP', 'mcp', 'acl_a_modules');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (93, 1, 'board', 'acp', 1, 75, 283, 284, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (94, 1, 'bbcodes', 'acp', 1, 75, 285, 286, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (95, 1, 'icons', 'acp', 1, 75, 287, 288, 'ACP_ICONS', 'icons', 'acl_a_icons');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (96, 1, 'icons', 'acp', 1, 75, 289, 290, 'ACP_SMILIES', 'smilies', 'acl_a_icons');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (97, 1, 'words', 'acp', 1, 75, 291, 292, 'ACP_WORDS', 'words', 'acl_a_words');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (98, 1, 'logs', 'acp', 1, 63, 421, 422, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (99, 1, 'logs', 'acp', 1, 63, 423, 424, 'ACP_MOD_LOGS', 'mod', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (100, 1, 'logs', 'acp', 1, 63, 425, 426, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_viewlogs');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (101, 1, 'language', 'acp', 1, 66, 435, 436, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_language');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (102, 1, 'bots', 'acp', 1, 66, 437, 438, 'ACP_BOTS', 'bots', 'acl_a_bots');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (103, 1, 'groups', 'acp', 1, 58, 337, 338, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (105, 1, 'email', 'acp', 1, 66, 439, 440, 'ACP_MASS_EMAIL', 'email', 'acl_a_email');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (106, 1, 'ranks', 'acp', 1, 57, 311, 312, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (107, 1, 'ban', 'acp', 1, 59, 349, 350, 'ACP_BAN_EMAILS', 'email', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (108, 1, 'ban', 'acp', 1, 59, 351, 352, 'ACP_BAN_IPS', 'ip', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (109, 1, 'ban', 'acp', 1, 59, 353, 354, 'ACP_BAN_USERNAMES', 'user', 'acl_a_ban');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (110, 1, 'disallow', 'acp', 1, 59, 347, 348, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (111, 1, 'prune', 'acp', 1, 59, 345, 346, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (112, 1, 'prune', 'acp', 1, 53, 267, 268, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (113, 1, 'profile', 'acp', 1, 57, 309, 310, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_profile');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (114, 1, 'forums', 'acp', 1, 53, 265, 266, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (115, 1, 'users', 'acp', 1, 57, 307, 308, 'ACP_MANAGE_USERS', 'overview', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (116, 1, 'users', 'acp', 0, 57, 313, 314, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (117, 1, 'users', 'acp', 0, 57, 315, 316, 'ACP_USER_PROFILE', 'profile', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (118, 1, 'users', 'acp', 0, 57, 317, 318, 'ACP_USER_PREFS', 'prefs', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (119, 1, 'users', 'acp', 0, 57, 319, 320, 'ACP_USER_AVATAR', 'avatar', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (120, 1, 'users', 'acp', 0, 57, 323, 324, 'ACP_USER_SIG', 'sig', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (121, 1, 'users', 'acp', 0, 57, 325, 326, 'ACP_USER_GROUPS', 'groups', 'acl_a_user && acl_a_group');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (122, 1, 'users', 'acp', 0, 57, 327, 328, 'ACP_USER_PERM', 'perm', 'acl_a_user && acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (123, 1, 'users', 'acp', 0, 57, 329, 330, 'ACP_USER_ATTACH', 'attach', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (141, 1, '', 'acp', 1, 49, 410, 417, 'ACP_STYLE_COMPONENTS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (142, 1, 'styles', 'acp', 1, 62, 407, 408, 'ACP_STYLES', 'style', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (143, 1, 'styles', 'acp', 1, 141, 411, 412, 'ACP_TEMPLATES', 'template', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (144, 1, 'styles', 'acp', 1, 141, 413, 414, 'ACP_THEMES', 'theme', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (145, 1, 'styles', 'acp', 1, 141, 415, 416, 'ACP_IMAGESETS', 'imageset', 'acl_a_styles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (147, 1, 'users', 'acp', 0, 57, 321, 322, 'ACP_USER_RANK', 'rank', 'acl_a_user');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (148, 1, 'permissions', 'acp', 1, 61, 361, 362, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (149, 1, 'permissions', 'acp', 1, 180, 377, 378, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (150, 1, 'permissions', 'acp', 1, 61, 363, 364, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (151, 1, 'permissions', 'acp', 1, 180, 379, 380, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (152, 1, 'permissions', 'acp', 1, 174, 367, 368, 'ACP_ADMINISTRATORS', 'setting_admin_global', 'acl_a_aauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (155, 1, 'permissions', 'acp', 1, 174, 369, 370, 'ACP_GLOBAL_MODERATORS', 'setting_mod_global', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (156, 1, 'permissions', 'acp', 1, 180, 375, 376, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (157, 1, 'permissions', 'acp', 1, 180, 373, 374, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (158, 1, '', 'acp', 1, 48, 392, 403, 'ACP_PERMISSION_MASKS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (159, 1, 'permissions', 'acp', 1, 158, 393, 394, 'ACP_VIEW_ADMIN_PERMISSIONS', 'view_admin_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (160, 1, 'permissions', 'acp', 1, 158, 395, 396, 'ACP_VIEW_USER_PERMISSIONS', 'view_user_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (161, 1, 'permissions', 'acp', 1, 158, 397, 398, 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS', 'view_mod_global', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (162, 1, 'permissions', 'acp', 1, 158, 399, 400, 'ACP_VIEW_FORUM_MOD_PERMISSIONS', 'view_mod_local', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (163, 1, 'permissions', 'acp', 1, 158, 401, 402, 'ACP_VIEW_FORUM_PERMISSIONS', 'view_forum_local', 'acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (165, 1, '', 'acp', 1, 48, 382, 391, 'ACP_PERMISSION_ROLES', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (174, 1, '', 'acp', 1, 48, 366, 371, 'ACP_SPECIAL_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (175, 1, 'permission_roles', 'acp', 1, 165, 383, 384, 'ACP_ADMIN_ROLES', 'admin_roles', 'acl_a_roles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (176, 1, 'permissions', 'acp', 1, 48, 358, 359, 'ACP_PERMISSIONS', 'intro', 'acl_a_authusers || acl_a_authgroups || acl_a_viewauth');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (177, 1, 'permission_roles', 'acp', 1, 165, 385, 386, 'ACP_USER_ROLES', 'user_roles', 'acl_a_roles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (178, 1, 'permission_roles', 'acp', 1, 165, 387, 388, 'ACP_MOD_ROLES', 'mod_roles', 'acl_a_roles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (179, 1, 'permission_roles', 'acp', 1, 165, 389, 390, 'ACP_FORUM_ROLES', 'forum_roles', 'acl_a_roles');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (180, 1, '', 'acp', 1, 48, 372, 381, 'ACP_FORUM_BASED_PERMISSIONS', '', '');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (181, 1, 'permissions', 'acp', 1, 54, 271, 272, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (182, 1, 'permissions', 'acp', 1, 54, 273, 274, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (183, 1, 'permissions', 'acp', 1, 54, 275, 276, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (184, 1, 'permissions', 'acp', 1, 54, 277, 278, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (185, 1, 'permissions', 'acp', 1, 57, 331, 332, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (186, 1, 'permissions', 'acp', 1, 58, 339, 340, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (187, 1, 'permissions', 'acp', 1, 58, 341, 342, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)');
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (188, 1, 'permissions', 'acp', 1, 57, 333, 334, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)');
|
||||
|
||||
# MCP
|
||||
INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, '', 'mcp', 1, 0, 35, 44, 'MCP_MAIN', '', '');
|
||||
|
@ -36,7 +36,7 @@ CREATE TABLE phpbb_auth_groups (
|
||||
group_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
forum_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_option_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_preset_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_role_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_setting tinyint(4) NOT NULL DEFAULT '0'
|
||||
);
|
||||
|
||||
@ -54,22 +54,22 @@ CREATE TABLE phpbb_auth_options (
|
||||
|
||||
CREATE INDEX auth_option_phpbb_auth_options on phpbb_auth_options (auth_option);
|
||||
|
||||
# Table: phpbb_auth_presets
|
||||
CREATE TABLE phpbb_auth_presets (
|
||||
preset_id INTEGER PRIMARY KEY NOT NULL,
|
||||
preset_name varchar(50) NOT NULL DEFAULT '',
|
||||
preset_type varchar(10) NOT NULL DEFAULT '',
|
||||
preset_group_id mediumint(8) NOT NULL DEFAULT '0'
|
||||
# Table: phpbb_auth_roles
|
||||
CREATE TABLE phpbb_auth_roles (
|
||||
role_id INTEGER PRIMARY KEY NOT NULL,
|
||||
role_name varchar(50) NOT NULL DEFAULT '',
|
||||
role_type varchar(10) NOT NULL DEFAULT '',
|
||||
role_group_ids varchar(255) NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX preset_type_phpbb_auth_presets on phpbb_auth_presets (preset_type);
|
||||
CREATE INDEX role_type_phpbb_auth_roles on phpbb_auth_roles (role_type);
|
||||
|
||||
# Table: phpbb_auth_preset_data
|
||||
CREATE TABLE phpbb_auth_preset_data (
|
||||
preset_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
# Table: phpbb_auth_roles_data
|
||||
CREATE TABLE phpbb_auth_roles_data (
|
||||
role_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_option_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_setting tinyint(2) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (preset_id, auth_option_id)
|
||||
PRIMARY KEY (role_id, auth_option_id)
|
||||
);
|
||||
|
||||
# Table: phpbb_auth_users
|
||||
@ -77,7 +77,7 @@ CREATE TABLE phpbb_auth_users (
|
||||
user_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
forum_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_option_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_preset_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_role_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
auth_setting tinyint(4) NOT NULL DEFAULT '0'
|
||||
);
|
||||
|
||||
|
@ -32,6 +32,7 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_ADMINISTRATORS' => 'Administrators',
|
||||
'ACP_ADMIN_LOGS' => 'Admin Log',
|
||||
'ACP_ADMIN_ROLES' => 'Admin Roles',
|
||||
'ACP_ATTACHMENTS' => 'Attachments',
|
||||
'ACP_ATTACHMENT_SETTINGS' => 'Attachment Settings',
|
||||
'ACP_AUTH_SETTINGS' => 'Authentication',
|
||||
@ -42,6 +43,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_BAN_EMAILS' => 'Ban Emails',
|
||||
'ACP_BAN_IPS' => 'Ban IPs',
|
||||
'ACP_BAN_USERNAMES' => 'Ban Usernames',
|
||||
'ACP_BASIC_PERMISSIONS' => 'Basic Permissions',
|
||||
'ACP_BBCODES' => 'BBCodes',
|
||||
'ACP_BOARD_DEFAULTS' => 'Board Defaults',
|
||||
'ACP_BOARD_MANAGEMENT' => 'Board Management',
|
||||
@ -70,10 +72,12 @@ $lang = array_merge($lang, array(
|
||||
'ACP_EMAIL_SETTINGS' => 'Email Settings',
|
||||
'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
|
||||
|
||||
'ACP_FORUM_LOGS' => 'Forum Logs',
|
||||
'ACP_FORUM_MANAGEMENT' => 'Forum Management',
|
||||
'ACP_FORUM_MODERATORS' => 'Forum Moderators',
|
||||
'ACP_FORUM_PERMISSIONS' => 'Forum Permissions',
|
||||
'ACP_FORUM_BASED_PERMISSIONS' => 'Forum Based Permissions',
|
||||
'ACP_FORUM_LOGS' => 'Forum Logs',
|
||||
'ACP_FORUM_MANAGEMENT' => 'Forum Management',
|
||||
'ACP_FORUM_MODERATORS' => 'Forum Moderators',
|
||||
'ACP_FORUM_PERMISSIONS' => 'Forum Permissions',
|
||||
'ACP_FORUM_ROLES' => 'Forum Roles',
|
||||
|
||||
'ACP_GENERAL_CONFIGURATION' => 'General Configuration',
|
||||
'ACP_GENERAL_TASKS' => 'General Tasks',
|
||||
@ -106,16 +110,15 @@ $lang = array_merge($lang, array(
|
||||
'ACP_MESSAGE_SETTINGS' => 'Message Settings',
|
||||
'ACP_MODULE_MANAGEMENT' => 'Module Management',
|
||||
'ACP_MOD_LOGS' => 'Moderator Log',
|
||||
'ACP_MOD_ROLES' => 'Mod Roles',
|
||||
|
||||
'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments',
|
||||
|
||||
'ACP_PERMISSIONS' => 'Permissions',
|
||||
'ACP_PERMISSION_MASKS' => 'Permission Masks',
|
||||
'ACP_PERMISSION_ROLES' => 'Permission Roles',
|
||||
'ACP_PERMISSION_SETTINGS' => 'Permission Settings',
|
||||
'ACP_PHP_INFO' => 'PHP Information',
|
||||
'ACP_PRESET_ADMIN' => 'Admin Permission Presets',
|
||||
'ACP_PRESET_FORUM' => 'Forum Permission Presets',
|
||||
'ACP_PRESET_MOD' => 'Mod Permission Presets',
|
||||
'ACP_PRESET_USER' => 'User Permission Presets',
|
||||
'ACP_PRUNE_FORUMS' => 'Prune Forums',
|
||||
'ACP_PRUNE_USERS' => 'Prune Users',
|
||||
'ACP_PRUNING' => 'Pruning',
|
||||
@ -125,6 +128,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_SERVER_CONFIGURATION' => 'Server Configuration',
|
||||
'ACP_SERVER_SETTINGS' => 'Server Settings',
|
||||
'ACP_SMILIES' => 'Smilies',
|
||||
'ACP_SPECIAL_PERMISSIONS' => 'Special Permissions',
|
||||
'ACP_STYLE_COMPONENTS' => 'Style Components',
|
||||
'ACP_STYLE_MANAGEMENT' => 'Style Management',
|
||||
'ACP_STYLES' => 'Styles',
|
||||
@ -145,6 +149,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_USER_PREFS' => 'Preferences',
|
||||
'ACP_USER_PROFILE' => 'Profile',
|
||||
'ACP_USER_RANK' => 'Rank',
|
||||
'ACP_USER_ROLES' => 'User Roles',
|
||||
'ACP_USER_SECURITY' => 'User Security',
|
||||
'ACP_USER_SIG' => 'Signature',
|
||||
|
||||
@ -427,8 +432,18 @@ $lang = array_merge($lang, array(
|
||||
'LOG_MODULE_ADD' => '<b>Module added</b><br />» %s',
|
||||
'LOG_MODULE_EDIT' => '<b>Module edited</b><br />» %s',
|
||||
|
||||
'LOG_PRESET_ADD' => '<b>Preset added</b><br />» %s',
|
||||
'LOG_PRESET_EDIT' => '<b>Preset edited</b><br />» %s',
|
||||
'LOG_A_ROLE_ADD' => '<b>Admin Role added</b><br />» %s',
|
||||
'LOG_A_ROLE_EDIT' => '<b>Admin Role edited</b><br />» %s',
|
||||
'LOG_A_ROLE_REMOVED' => '<b>Admin Role removed</b><br />» %s',
|
||||
'LOG_F_ROLE_ADD' => '<b>Forum Role added</b><br />» %s',
|
||||
'LOG_F_ROLE_EDIT' => '<b>Forum Role edited</b><br />» %s',
|
||||
'LOG_F_ROLE_REMOVED' => '<b>Forum Role removed</b><br />» %s',
|
||||
'LOG_M_ROLE_ADD' => '<b>Mod Role added</b><br />» %s',
|
||||
'LOG_M_ROLE_EDIT' => '<b>Mod Role edited</b><br />» %s',
|
||||
'LOG_M_ROLE_REMOVED' => '<b>Mod Role removed</b><br />» %s',
|
||||
'LOG_U_ROLE_ADD' => '<b>User Role added</b><br />» %s',
|
||||
'LOG_U_ROLE_EDIT' => '<b>User Role edited</b><br />» %s',
|
||||
'LOG_U_ROLE_REMOVED' => '<b>User Role removed</b><br />» %s',
|
||||
|
||||
'LOG_PROFILE_FIELD_ACTIVATE' => '<b>Profile field activated</b><br />» %s',
|
||||
'LOG_PROFILE_FIELD_CREATE' => '<b>Profile field added</b><br />» %s',
|
||||
|
@ -37,7 +37,9 @@ $lang = array_merge($lang, array(
|
||||
'AUTO_PRUNE_VIEWED' => 'Auto-prune Post Viewed Age',
|
||||
'AUTO_PRUNE_VIEWED_EXPLAIN' => 'Number of days since topic was viewed after which topic is removed.',
|
||||
|
||||
'CREATE_FORUM' => 'Create new forum',
|
||||
'COPY_PERMISSIONS' => 'Copy permissions from',
|
||||
'COPY_PERMISSIONS_EXPLAIN' => 'Once created, the forum will have the same permissions as the one you select here. If no forum is selected the newly created forum will not be visible until permissions had been set.',
|
||||
'CREATE_FORUM' => 'Create new forum',
|
||||
|
||||
'DECIDE_MOVE_DELETE_CONTENT' => 'Delete content or move to forum',
|
||||
'DEFAULT_STYLE' => 'Default Style',
|
||||
@ -107,6 +109,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to',
|
||||
'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content',
|
||||
'NO_PARENT' => 'No Parent',
|
||||
'NO_PERMISSIONS' => 'Do not copy permissions',
|
||||
'NO_PERMISSION_FORUM_ADD' => 'You do not have the neccessary permissions to delete forums',
|
||||
'NO_PERMISSION_FORUM_DELETE' => 'You do not have the neccessary permissions to add forums',
|
||||
|
||||
|
@ -33,7 +33,9 @@ $lang = array_merge($lang, array(
|
||||
'ADD_USERS' => 'Add Users',
|
||||
'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a seperate line.',
|
||||
|
||||
'CREATE_GROUP' => 'Create new group',
|
||||
'COPY_PERMISSIONS' => 'Copy permissions from',
|
||||
'COPY_PERMISSIONS_EXPLAIN' => 'Once created, the group will have the same permissions as the one you select here.',
|
||||
'CREATE_GROUP' => 'Create new group',
|
||||
|
||||
'GROUPS_NO_MEMBERS' => 'This group has no members',
|
||||
'GROUPS_NO_MODS' => 'No group leaders defined',
|
||||
@ -90,6 +92,7 @@ $lang = array_merge($lang, array(
|
||||
'GROUP_USERS_REMOVE' => 'Users removed from group and new defaults set successfully',
|
||||
|
||||
'NO_GROUP' => 'No group specified',
|
||||
'NO_PERMISSIONS' => 'Do not copy permissions',
|
||||
'NO_USERS' => 'The requested users do not exist',
|
||||
|
||||
'SPECIAL_GROUPS' => 'Predefined groups',
|
||||
|
@ -56,10 +56,10 @@ $lang = array_merge($lang, array(
|
||||
'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator rights to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.',
|
||||
'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.',
|
||||
'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and admin permissions. User permissions include capabilities such as the use of avatars, sending private messages, etc. Global moderator permissions are blabla, administrative permissions blabla. Individual users permissions should only be changed in rare occassions, the preferred method is putting users in groups and assigning the groups permissions.',
|
||||
'ACP_PRESET_ADMIN_EXPLAIN' => 'Here you are able to manage the presets for administrative permissions. Presets are effective permissions, if you change a preset the items having this preset assigned will change it\'s permissions too.',
|
||||
'ACP_PRESET_FORUM_EXPLAIN' => 'Here you are able to manage the presets for forum permissions. Presets are effective permissions, if you change a preset the items having this preset assigned will change it\'s permissions too.',
|
||||
'ACP_PRESET_MOD_EXPLAIN' => 'Here you are able to manage the presets for moderative permissions. Presets are effective permissions, if you change a preset the items having this preset assigned will change it\'s permissions too.',
|
||||
'ACP_PRESET_USER_EXPLAIN' => 'Here you are able to manage the presets for user permissions. Presets are effective permissions, if you change a preset the items having this preset assigned will change it\'s permissions too.',
|
||||
'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
|
||||
'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
|
||||
'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
|
||||
'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
|
||||
'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.',
|
||||
'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and admin permissions. User permissions include capabilities such as the use of avatars, sending private messages, etc. Global moderator permissions are blabla, administrative permissions blabla. To alter these settings for large numbers of users the Group permissions system is the prefered method. Users permissions should only be changed in rare occassions, the preferred method is putting users in groups and assigning the groups permissions.',
|
||||
'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups',
|
||||
@ -70,22 +70,30 @@ $lang = array_merge($lang, array(
|
||||
|
||||
'ADD_GROUPS' => 'Add Groups',
|
||||
'ADD_USERS' => 'Add Users',
|
||||
'ALL_GROUPS' => 'Select all groups',
|
||||
'ALL_NO' => 'All No',
|
||||
'ALL_UNSET' => 'All Unset',
|
||||
'ALL_USERS' => 'Select all users',
|
||||
'ALL_YES' => 'All Yes',
|
||||
'APPLY_ALL_PERMISSIONS' => 'Apply all Permissions',
|
||||
'APPLY_PERMISSIONS' => 'Apply Permissions',
|
||||
'APPLY_PERMISSIONS_EXPLAIN' => 'The Permissions and Preset defined for this item will only be applied to this item and all checked items.',
|
||||
'APPLY_PERMISSIONS_EXPLAIN' => 'The Permissions and Role defined for this item will only be applied to this item and all checked items.',
|
||||
'AUTH_UPDATED' => 'Permissions have been updated',
|
||||
|
||||
'CREATE_PRESET' => 'Create Preset',
|
||||
'CREATE_PRESET_FROM' => 'Use settings from...',
|
||||
|
||||
'EDIT_PRESET' => 'Edit Preset',
|
||||
'CREATE_ROLE' => 'Create Role',
|
||||
'CREATE_ROLE_FROM' => 'Use settings from...',
|
||||
'CUSTOM' => 'Custom...',
|
||||
|
||||
'DELETE_ROLE' => 'Delete role',
|
||||
'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will <strong>not</strong> loosing their permission settings.',
|
||||
'DISPLAY_FOR_GROUP' => 'Display for group',
|
||||
'DISPLAY_FOR_GROUP_EXPLAIN' => 'The role only shows up for the selected group(s). This is helpful if you set options only meant for some groups for example.',
|
||||
'DISPLAY_ROLE_ITEMS' => 'View Items using this role',
|
||||
|
||||
'EDIT_ROLE' => 'Edit Role',
|
||||
'EVERY_USER_GROUP' => 'Every user/group',
|
||||
|
||||
'GROUP_BINDING' => 'Group Binding',
|
||||
'GROUP_BINDING_EXPLAIN' => 'If a group is selected here the preset only shows up for the selected group. This is helpful if you set options only meant for administrators for example.',
|
||||
'GROUPS_NOT_ASSIGNED' => 'No group assigned to this role',
|
||||
|
||||
'LOOK_UP_FORUMS_EXPLAIN' => 'You are able to select more than one forum',
|
||||
'LOOK_UP_GROUP' => 'Look up Usergroup',
|
||||
@ -95,30 +103,56 @@ $lang = array_merge($lang, array(
|
||||
'MANAGE_USERS' => 'Manage Users',
|
||||
|
||||
'NO_AUTH_SETTING_FOUND' => 'Permission settings not defined.',
|
||||
'NO_PRESET_NAME_SPECIFIED' => 'Please give the preset a name.',
|
||||
'NO_PRESET_SELECTED' => 'Preset could not be found.',
|
||||
'NO_ROLE_AVAILABLE' => 'No role available',
|
||||
'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
|
||||
'NO_ROLE_SELECTED' => 'Role could not be found.',
|
||||
|
||||
'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.',
|
||||
|
||||
'PERM_PRESET_APPLIED_TO_ALL' => 'Permissions and Preset will also be applied to all checked objects',
|
||||
'PRESET' => 'Preset',
|
||||
'PRESET_ADD_SUCCESS' => 'Preset successfully added.',
|
||||
'PRESET_DETAILS' => 'Preset Details',
|
||||
'PRESET_EDIT_SUCCESS' => 'Preset successfully edited.',
|
||||
'PRESET_NAME' => 'Preset Name',
|
||||
'PRESET_NAME_ALREADY_EXIST' => 'A preset named <strong>%s</strong> already exist for the specified settings.',
|
||||
'PERMISSION_APPLIED_TO_ALL' => 'Permissions and Role will also be applied to all checked objects',
|
||||
'PLUS_SUBFORUMS' => '+Subforums',
|
||||
'PRE_ALL_CLOSED' => 'All closed groups',
|
||||
'PRE_ALL_FREE' => 'All freely open groups',
|
||||
'PRE_ALL_HIDDEN' => 'All hidden groups',
|
||||
'PRE_ALL_OPEN' => 'All open groups',
|
||||
'PRE_ALL_SPECIAL' => 'All special groups',
|
||||
'PRE_NOT_CLOSED' => 'All groups excluding closed groups',
|
||||
'PRE_NOT_FREE' => 'All groups excluding freely open groups',
|
||||
'PRE_NOT_HIDDEN' => 'All groups excluding hidden groups',
|
||||
'PRE_NOT_OPEN' => 'All groups excluding open groups',
|
||||
'PRE_NOT_SPECIAL' => 'All groups excluding special groups',
|
||||
'PRE_NOT_SPECIAL_GUEST' => 'All groups excluding special guest groups',
|
||||
'PRE_NOT_SPECIAL_REGISTERED' => 'All groups excluding special registered groups',
|
||||
'PRE_ONLY_SPECIAL_GUEST' => 'Only special guest groups',
|
||||
'PRE_ONLY_SPECIAL_REGISTERED' => 'Only special registered groups',
|
||||
|
||||
'REMOVE_ROLE' => 'Remove Role',
|
||||
'ROLE' => 'Role',
|
||||
'ROLE_ADD_SUCCESS' => 'Role successfully added.',
|
||||
'ROLE_ASSIGNED_TO' => 'Role assigned to',
|
||||
'ROLE_DELETED' => 'Role successfully removed.',
|
||||
'ROLE_DETAILS' => 'Role Details',
|
||||
'ROLE_EDIT_SUCCESS' => 'Role successfully edited.',
|
||||
'ROLE_NAME' => 'Role Name',
|
||||
'ROLE_NAME_ALREADY_EXIST' => 'A role named <strong>%s</strong> already exist for the specified permission type.',
|
||||
'ROLE_NOT_ASSIGNED' => 'Role has not been assigned yet.',
|
||||
|
||||
'SELECTED_FORUM_NOT_EXIST' => 'The selected forum(s) do not exist',
|
||||
'SELECTED_GROUP_NOT_EXIST' => 'The selected group(s) do not exist',
|
||||
'SELECTED_USER_NOT_EXIST' => 'The selected user(s) do not exist',
|
||||
'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection',
|
||||
'SELECT_ROLE' => 'Select role...',
|
||||
'SELECT_TYPE' => 'Select type',
|
||||
'SET_PERMISSIONS' => 'Set permissions',
|
||||
'SET_ROLE_PERMISSIONS' => 'Set role permissions',
|
||||
'SET_USERS_PERMISSIONS' => 'Set users permissions',
|
||||
'SET_USERS_FORUM_PERMISSIONS' => 'Set users forum permissions',
|
||||
|
||||
'USERS_NOT_ASSIGNED' => 'No user assigned to this role',
|
||||
'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following default groups',
|
||||
'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following custom groups',
|
||||
|
||||
'VIEW_ASSIGNED_ITEMS' => 'View assigned items',
|
||||
'VIEW_PERMISSIONS' => 'View permissions',
|
||||
|
||||
'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected',
|
||||
|
@ -54,16 +54,18 @@ if (empty($lang) || !is_array($lang))
|
||||
$lang = array_merge($lang, array(
|
||||
'permission_cat' => array(
|
||||
'actions' => 'Actions',
|
||||
'forums' => 'Forums',
|
||||
'post' => 'Post',
|
||||
'posting' => 'Posting',
|
||||
'polls' => 'Polls',
|
||||
'content' => 'Content',
|
||||
'pm' => 'Private Messages',
|
||||
'forums' => 'Forums',
|
||||
'misc' => 'Misc',
|
||||
'profile' => 'Profile',
|
||||
'permissions' => 'Permissions',
|
||||
'pm' => 'Private Messages',
|
||||
'polls' => 'Polls',
|
||||
'post' => 'Post',
|
||||
'post_actions' => 'Post Actions',
|
||||
'posting' => 'Posting',
|
||||
'profile' => 'Profile',
|
||||
'settings' => 'Settings',
|
||||
'topic_actions' => 'Topic Actions',
|
||||
'user_group' => 'Users & Groups',
|
||||
),
|
||||
|
||||
@ -156,18 +158,18 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Moderator Permissions
|
||||
$lang = array_merge($lang, array(
|
||||
'acl_m_edit' => array('lang' => 'Can edit posts', 'cat' => 'actions'),
|
||||
'acl_m_delete' => array('lang' => 'Can delete posts', 'cat' => 'actions'),
|
||||
'acl_m_move' => array('lang' => 'Can move topics', 'cat' => 'actions'),
|
||||
'acl_m_lock' => array('lang' => 'Can lock topics', 'cat' => 'actions'),
|
||||
'acl_m_split' => array('lang' => 'Can split topics', 'cat' => 'actions'),
|
||||
'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'actions'),
|
||||
'acl_m_approve' => array('lang' => 'Can approve posts', 'cat' => 'actions'),
|
||||
'acl_m_unrate' => array('lang' => 'Can un-rate posts', 'cat' => 'actions'),
|
||||
'acl_m_edit' => array('lang' => 'Can edit posts', 'cat' => 'post_actions'),
|
||||
'acl_m_delete' => array('lang' => 'Can delete posts', 'cat' => 'post_actions'),
|
||||
'acl_m_approve' => array('lang' => 'Can approve posts', 'cat' => 'post_actions'),
|
||||
'acl_m_chgposter' => array('lang' => 'Can change post author', 'cat' => 'post_actions'),
|
||||
|
||||
'acl_m_auth' => array('lang' => 'Can set permissions', 'cat' => 'misc'),
|
||||
'acl_m_ip' => array('lang' => 'Can view IP\'s', 'cat' => 'misc'),
|
||||
'acl_m_info' => array('lang' => 'Can alter forum info', 'cat' => 'misc'),
|
||||
'acl_m_move' => array('lang' => 'Can move topics', 'cat' => 'topic_actions'),
|
||||
'acl_m_lock' => array('lang' => 'Can lock topics', 'cat' => 'topic_actions'),
|
||||
'acl_m_split' => array('lang' => 'Can split topics', 'cat' => 'topic_actions'),
|
||||
'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'topic_actions'),
|
||||
|
||||
'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'),
|
||||
'acl_m_warn' => array('lang' => 'Can issue warnings', 'cat' => 'misc'),
|
||||
));
|
||||
|
||||
// Admin Permissions
|
||||
@ -206,6 +208,7 @@ $lang = array_merge($lang, array(
|
||||
'acl_a_uauth' => array('lang' => 'Can alter user permissions', 'cat' => 'permissions'),
|
||||
'acl_a_authgroups' => array('lang' => 'Can alter permissions for groups', 'cat' => 'permissions'),
|
||||
'acl_a_authusers' => array('lang' => 'Can alter permissions for users', 'cat' => 'permissions'),
|
||||
'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'),
|
||||
|
||||
'acl_a_styles' => array('lang' => 'Can manage styles', 'cat' => 'misc'),
|
||||
'acl_a_viewlogs' => array('lang' => 'Can view logs', 'cat' => 'misc'),
|
||||
|
@ -271,6 +271,7 @@ $lang = array_merge($lang, array(
|
||||
'NONE' => 'None',
|
||||
'NOT_WATCHING_FORUM'=> 'You no subscribe to updates on this forum',
|
||||
'NOT_WATCHING_TOPIC'=> 'You are no longer subscribed to this topic.',
|
||||
'NO_AUTH_OPERATION' => 'You do not have the neccessary permissions to complete this operation.',
|
||||
'NO_BIRTHDAYS' => 'No birthdays today',
|
||||
'NO_FORUM' => 'The forum you selected does not exist',
|
||||
'NO_FORUMS' => 'This board has no forums',
|
||||
|
@ -803,7 +803,7 @@ switch ($mode)
|
||||
$sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
|
||||
}
|
||||
|
||||
if ($ipdomain && $auth->acl_get('m_ip'))
|
||||
if ($ipdomain && $auth->acl_get('m_info'))
|
||||
{
|
||||
$ips = (preg_match('#[a-z]#', $ipdomain)) ? implode(', ', preg_replace('#([0-9]{1,3}\.[0-9]{1,3}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#', "'\\1'", gethostbynamel($ipdomain))) : "'" . str_replace('*', '%', $ipdomain) . "'";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user