function tac_lite_help in Taxonomy Access Control Lite 8
Same name and namespace in other branches
- 5 tac_lite.module \tac_lite_help()
- 6 tac_lite.module \tac_lite_help()
- 7 tac_lite.module \tac_lite_help()
Implements hook_help().
File
- ./
tac_lite.module, line 20 - Control access to site content based on taxonomy, roles and users.
Code
function tac_lite_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the block module.
case 'help.page.tac_lite':
$admin_taclite = Url::fromRoute('tac_lite.administration');
$admin_tac_lite_url = Link::fromTextAndUrl(t('administer -> people -> access control by taxonomy'), $admin_taclite);
$output = '<p>' . t('Taxonomy Access Control Lite allows you to restrict access to site content. It uses a simple scheme based on Taxonomy, Users and Roles.') . '</p>';
$output .= '<p>' . t("This module leverages Drupal's node_access table allows this module to grant permission to view, update, and delete nodes. To control which users can <em>create</em> new nodes, use Drupal's role based permissions.") . '</p>';
$output .= '<p>' . t("It is important to understand that this module <em>grants</em> privileges, as opposed to <em>revoking</em> privileges. So, use Drupal's built-in permissions to hide content from certain roles, then use this module to show the content. This module cannot hide content that the user is allowed to see based on their existing privileges.") . '</p>';
$output .= '<p>' . t('There are several steps required to set up Taxonomy Access Control Lite.') . '</p>';
$output .= '<ol>';
$output .= '<li>' . t("Define one or more vocabularies whose terms will control which users have access. For example, you could define a vocabulary called 'Privacy' with terms 'Public' and 'Private'.") . '</li>';
$output .= '<li>' . t('Tell this module which vocabularies control privacy :url', [
':url' => $admin_tac_lite_url,
]) . '</li>';
$output .= '<li>' . t('Configure one or more <em>schemes</em>. simple site may need only one scheme which grants view permission. A more complex site might require additional schemes for update and delete. Each scheme associates roles and terms. Users will be granted priviliges based on their role and the terms with which nodes are tagged.') . '</li>';
$output .= '<li>' . t('When settings are correct, <a href=:url>rebuild node_access permissions</a>.', [
':url' => Url::fromRoute('node.configure_rebuild_confirm')
->toString(),
]) . '</li>';
$output .= '<li>' . t('Optionally, grant access to individual users. (See the <em>access by taxonomy</em> tab, under user -> edit.)') . '</li>';
$output .= '</ol>';
$output .= '<p>' . t('Troubleshooting:.') . '<ul>';
$output .= '<li>' . t('Try rebuilding node_access permissions.') . '</li>';
$output .= '<li>' . t('Try disabling tac_lite.module, rebuilding permissions. With the module disabled, users should not have the privileges you are attempting to grant with this module.') . '</li>';
$output .= '<li>' . t("The devel_node_access.module (part of <a href=:url>devel</a>) helps to see exactly what Drupal's node_access table is doing.", [
':url' => 'http://drupal.org/project/devel',
]) . '</li>';
$output .= '</ul></p>';
return $output;
}
}