You are here

README.txt in Access Filter 8

Same filename and directory in other branches
  1. 7 README.txt
CONTENTS OF THIS FILE
---------------------

 * About Access Filter
 * Features
 * Configration
 * Todo

ABOUT ACCESS FILTER
--------------------

This module provides access control with paths/URIs and IP addresses.


FEATURES
--------------------

Filter:
  * Condition:
    The conditions to execute filter.
  * Rule:
    Rule to deny/allow access.
  * Response:
    Select response code, customize response body.


CONFIGRATION
--------------------

Getting started:
  * Open /admin/config/people/access_filter to list filters.
  * Click "Add filter" to create new filter.
  * Add below line to conditions
    - { type: path, path: '/' }
  * Add below line to rules (replace address with yours)
    - { type: ip, action: deny, address: '127.0.0.1' }
  * Open front page, your access will be denied.


Conditions:
  * type: path
    Targets Drupal path.
    - path: Drupal path.
    - regex: Use regex.

  * type: uri
    Targets request URI that contains query parameters.
    - uri: Request URI.
    - regex: Use regex.

  * type: session
    Targets session value ($_SESSION).
    - key: Session key.
    - value: Value to compare.
    - regex: Use regex.

  * type: cookie
    Targets cookie value ($_COOKIE).
    - key: Cookie key.
    - value: Value to compare.
    - regex: Use regex.

  * type: env
    Targets server environment value ($_SERVER).
    - key: Environment key.
    - value: Value to compare.
    - regex: Use regex.

  * type: and
    Join conditions with AND.
    - conditions: Conditions to join.

  * type: or
    Join conditions with OR.
    - conditions: Conditions to join.

All conditions can be negated by specifying "negate: 1".

Rules:
  * type: ip
    Deny/allow using IP address.
    - ip: IP address.

See add/edit filter page to see samples.

You can also add custom condition/rule by implementing plugins.
See source code in Plugin/AccessFilter/Condition, Plugin/AccessFilter/Rule.



More settings:
  * Disabling module
    If you make a mistake setting filters, you can add below line to
    your settings.php to disable access control of this module.
    >--
    // Disable Access Filter access control.
    $settings['access_filter_disabled'] = TRUE;
    --<

TODO
--------------------

* Add condition or rule using current user.
* Add condition using protocol/domain.

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * About Access Filter
  4. * Features
  5. * Configration
  6. * Todo
  7. ABOUT ACCESS FILTER
  8. --------------------
  9. This module provides access control with paths/URIs and IP addresses.
  10. FEATURES
  11. --------------------
  12. Filter:
  13. * Condition:
  14. The conditions to execute filter.
  15. * Rule:
  16. Rule to deny/allow access.
  17. * Response:
  18. Select response code, customize response body.
  19. CONFIGRATION
  20. --------------------
  21. Getting started:
  22. * Open /admin/config/people/access_filter to list filters.
  23. * Click "Add filter" to create new filter.
  24. * Add below line to conditions
  25. - { type: path, path: '/' }
  26. * Add below line to rules (replace address with yours)
  27. - { type: ip, action: deny, address: '127.0.0.1' }
  28. * Open front page, your access will be denied.
  29. Conditions:
  30. * type: path
  31. Targets Drupal path.
  32. - path: Drupal path.
  33. - regex: Use regex.
  34. * type: uri
  35. Targets request URI that contains query parameters.
  36. - uri: Request URI.
  37. - regex: Use regex.
  38. * type: session
  39. Targets session value ($_SESSION).
  40. - key: Session key.
  41. - value: Value to compare.
  42. - regex: Use regex.
  43. * type: cookie
  44. Targets cookie value ($_COOKIE).
  45. - key: Cookie key.
  46. - value: Value to compare.
  47. - regex: Use regex.
  48. * type: env
  49. Targets server environment value ($_SERVER).
  50. - key: Environment key.
  51. - value: Value to compare.
  52. - regex: Use regex.
  53. * type: and
  54. Join conditions with AND.
  55. - conditions: Conditions to join.
  56. * type: or
  57. Join conditions with OR.
  58. - conditions: Conditions to join.
  59. All conditions can be negated by specifying "negate: 1".
  60. Rules:
  61. * type: ip
  62. Deny/allow using IP address.
  63. - ip: IP address.
  64. See add/edit filter page to see samples.
  65. You can also add custom condition/rule by implementing plugins.
  66. See source code in Plugin/AccessFilter/Condition, Plugin/AccessFilter/Rule.
  67. More settings:
  68. * Disabling module
  69. If you make a mistake setting filters, you can add below line to
  70. your settings.php to disable access control of this module.
  71. >--
  72. // Disable Access Filter access control.
  73. $settings['access_filter_disabled'] = TRUE;
  74. --<
  75. TODO
  76. --------------------
  77. * Add condition or rule using current user.
  78. * Add condition using protocol/domain.