16 The Permissions by Term module extends Drupal by functionality for restricting
17 access to single nodes via taxonomy terms. Taxonomy term permissions can be
18 coupled to specific user accounts and/or user roles. Taxonomy terms are part of
19 the Drupal core functionality.
21 Since Permissions by Term is using Node Access Records, every other core system
29 * For a full description of the module visit:
30 https://www.drupal.org/project/permissions_by_term
32 https://www.drupal.org/docs/8/modules/permissions-by-term
34 * To submit bug reports and feature suggestions, or to track changes visit:
35 https://www.drupal.org/project/issues/permissions_by_term
41 This module requires no modules outside of Drupal core.
47 Module ships with Permissions by Entity module that extends the functionality of
48 Permissions By Term to be able to limit the selection of specific taxonomy terms
49 by users or roles for an entity.
51 * Webform Permissions Term -
52 https://www.drupal.org/project/webform_permissions_by_term
58 * Install the Permissions by Term module as you would normally install a
59 contributed Drupal module. Visit https://www.drupal.org/node/1897420 for
66 1. Navigate to Administration > Extend and enable the module.
67 2. Navigate to Administration > Structure > Taxonomy to create or edit a
68 taxonomy term and add permissions to it. You can edit permissions in the
69 "Permissions" labeled form field set.
70 3. Enter in allowed users with a comma separated list of user names will be
71 able to access content, related to this taxonomy term.
72 4. Select the user roles who will be able to access content, related to the
81 * composer.json config - Make sure that the dependencies for Behat testing are
82 installed. Check your drupal's `composer.json` file for the following
85 "composer/installers": "^1.0.24",
86 "wikimedia/composer-merge-plugin": "~1.4",
87 "drupal/drupal-extension": "~3.0",
88 "guzzlehttp/guzzle" : "^6.0@dev",
89 "drupal/drupal-driver": "~1.0",
90 "behat/behat": "^3.1",
92 "behat/mink-extension": "^2.2",
93 "behat/mink-selenium2-driver": "^1.3",
94 "behat/mink-goutte-driver": "^1.2"
101 "core/composer.json",
102 "modules/permissions_by_term/composer.json"
113 "Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer",
114 "Drupal\\Tests\\permissions_by_term\\Behat\\Context\\": "modules/permissions_by_term/tests/src/Behat/Context"
119 * behat.yml file: Use the file at `tests/src/Behat/behat.yml.dist` as a
120 template for your needs. Copy and name it to `behat.yml` and change it's
121 paths according to your needs.
123 * Chromedriver: It is recommended to use the
124 [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) as the
125 driver between your Google Chrome browser and Behat. Make sure, that the
126 Chromedriver version matches your operating system and your Google Chrome
129 * Quick testing with a SQlite database: In
130 `permissions_by_term/tests/src/Behat/fixtures/db.sqlite` you can find a
131 SQLite database to test from. It is a standard Drupal 8 installation with PbT
132 module installed. That way each test run proceeds quicker, because it is one
133 file instead an entire relational database.
135 Make sure that the path to the SQLite database is contained in your
136 `settings.php` file. PbT awaits that the path is
137 `/sites/default/db.sqlite`. E.g.:
138 ``` $databases['default']['default'] = array (
139 'database' => '/Users/peter/Dev/mamp/permissions-by-term/sites/default/db.sqlite',
141 'namespace' => 'Drupal\\Core\\Database\\Driver\\sqlite',
142 'driver' => 'sqlite',
146 The database file location is fixed, because the DB gets wiped after each Behat
153 * Peter Majmesku - https://www.drupal.org/u/peter-majmesku
154 * Janak Singh (dakku) - https://www.drupal.org/u/dakku
156 Supporting organiztion:
158 * publicplan GmbH - https://www.drupal.org/publicplan-gmbh