function taxonomy_access_help in Taxonomy Access Control 5
Same name and namespace in other branches
- 5.2 taxonomy_access.module \taxonomy_access_help()
- 6 taxonomy_access.module \taxonomy_access_help()
- 7 taxonomy_access.module \taxonomy_access_help()
Implementation of hook_help
File
- ./
taxonomy_access.module, line 13 - Allows administrators to specify how each category (in the taxonomy) can be used by various roles.
Code
function taxonomy_access_help($section) {
global $tac_user_roles;
switch ($section) {
// Creates the header content for the taxonomy_access settings page dependent upon
// whether the node is enabled or disabled.
// Note: the form that appears on this page is not generated by this fucntion.
case 'admin/settings/taxonomy_access':
$message = 'Some new options coming soon...';
return $message;
case 'admin/help#taxonomy_access':
$message = '<p>' . t('The Taxonomy Access Control module allows users to specify how each category can be used by various roles.') . '</p>';
$message .= '<p>' . t('Permissions can be set differently to each USER ROLES. Be aware that setting Taxonony Access permissions works ONLY WITHIN ONE USER ROLE. <br /><em>(For users with multiple user roles, see section "GOOD TO KNOW" below.)</em>') . '</p>';
$message .= '<p>' . t('On the category permissions page for each role, each category displays a list of the terms within it, each with five types of permission: <em>View, Update, Delete, Create</em> and <em>List</em>:') . '</p>';
$message .= '<ul>';
$message .= '<li>' . t('<strong>VIEW</strong> enables the user to access content (nodes) with given term.') . '</li>';
$message .= '<li>' . t('<strong>UPDATE, DELETE</strong> enables the user to Update/Delete <u>ALL</u> nodes with the given term. <br><em>(These two permissions are <u>administrator permissions</u>, that should be given ONLY to e.g. content administrators.)</em>') . '</li>';
$message .= '<li>' . t('<strong>CREATE</strong> enables the user to set that term when adding a new node or when editing a node.') . '</li>';
$message .= '<li>' . t('<strong>LIST</strong> enables the user to view the name of the given term below the title of a node or in category lists. It also controls whether a user can access the taxonomy page for the given term. (e.g. "taxonomy/term/*")') . '</li>';
$message .= '</ul>';
$message .= '<p>' . t('VIEW, UPDATE, and DELETE control the node access system. LIST and CREATE control if a user can view and select a given term. (Note: In previous versions of Taxonomy Access Control, there was no LIST permission; its functionality was controlled by the VIEW permission.)') . '</p>';
$message .= '<p>' . t('<strong>VIEW, UPDATE and DELETE have three options for each term: <u>A</u>llow, <u>I</u>gnore, and <u>D</u>eny.</strong> Indicate which rights each role should have for each term.') . '</p>';
$message .= '<p>' . t('<strong>CREATE and LIST have only two options for each term: YES (selected) or NO (deselected).</strong> Indicate what each role should be allowed to do with each term.') . '</p>';
$message .= '<p>' . t('<strong>IMPORTANT NOTE:</strong><br><u>The DENY directives are processed after the ALLOW directives. (DENY overrides ALLOW.)</u> So, if a multicategory node is in Categories "A" and "B" and a user has ALLOW permissions for VIEW in Category "A" and DENY permissions for VIEW in Category "B", then the user will NOT be permitted to VIEW the node. (DENY overrides ALLOW.)<br><u>Access is denied by default.</u> So, if a multicategory node is in Categories "C" and "D" and a user has IGNORE permissions for VIEW in both Category "C" and "D", then the user will NOT be permitted to VIEW the node.<br>(If you are familiar with Apache mod_access, this permission system works similar to directive: <em>ORDER ALLOW, DENY</em>)') . '</p>';
$message .= '<p>' . t('<strong>Allow/Ignore/Deny All</strong> or <strong>Select/Deselect All:</strong><br>Beside each vocabulary title there are dropdowns containing the options that can be set for individual terms. Selecting one of these options using the dropdown effectively <u>selects that option for ALL of the individual terms inside that vocabulary when the options are saved.</u><br>Selecting "--" does not make any automatic changes to the permission of the terms in that vocabulary; only manual changes that you make will be saved.<br>NOTE: This does <u>not</u> change the "Default" option (described below).') . '</p>';
$message .= '<p>' . t('<strong>Default:</strong><br>This option, just underneath the vocabulary title, <u>sets the permission that will automatically be given</u> to the role, <u>for any new terms</u> that are added within the vocabulary. This includes terms that are added via free tagging.') . '</p>';
$message .= '<p><strong>' . t('GOOD TO KNOW:') . '</strong></p>';
$message .= '<p>' . t('<strong>Users with multiple user roles:</strong> Allow/Ignore/Deny options are interpreted <u>only within one user role</u>. When a user belongs to multiple user roles, then <u>user gets access if ANY of his user roles</u> has the access granted. <br />In this case, permissions for the given user are calculated, so that the <u>permissions of ALL of his user roles are "OR-ed" together</u>. Meaning that Allow will take precedence over Deny. This is different from how node access permissions (for multi-category nodes) are handled within ONE USER ROLE, as noted above.') . '</p>';
$message .= '<p>' . t('<br><strong>Input formats:</strong> <u>Node editing/deleting is blocked</u>, even when user has <em>UPDATE/DELETE</em> permission to the node, <u>when user is not allowed to use a filter format</u> that the node was saved at.') . '</p>';
$message .= '<p> </p>';
return $message;
default:
if (strpos($section, 'admin/user/taxonomy_access') === 0) {
$rid = arg(3);
if (isset($tac_user_roles[$rid]) && $tac_user_roles[$rid]) {
$output = t('<p><strong>Vocabulary Settings:</strong> Each vocabulary displays a list of the terms within it, each with five types of permission: <em>View, Update, Delete, Create</em> and <em>List</em>.</p><p>For a detailed description of these permissions and how to use them, see <a href="@taxonomy_access_help">Taxonomy Access Control help</a>. If you are new to Taxonomy Access Control, it is very important that you read the help page.</p>', array(
'@taxonomy_access_help' => url('admin/help/taxonomy_access'),
));
return $output;
}
else {
return '<p>' . t('In this area you will define the permissions that each <a href="@role">user role</a> has for each category. Each category can have <em>View, Update, Delete, Create</em> and <em>List</em> permissions set for each user role.', array(
'@role' => url('admin/user/roles'),
)) . '</p>';
}
}
}
}