exp:addanonymouspublicpolicies
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Give the Anonymous role the public policies it lacks: user/register, rss/feed, tags/view, the newsletter's public views (dry run unless --apply)
Usage
./console exp:addanonymouspublicpolicies [options] php bin/php/addanonymouspublicpolicies.php [options]
Help
The output of ./console help exp:addanonymouspublicpolicies (the script run with --help), without the standard options:
Usage: bin/php/addanonymouspublicpolicies.php [OPTION]...
Give the Anonymous role the policies a visitor who is not signed in needs on a public site and
it lacks: user/register (a new installation takes it out of PolicyOmitList[]), rss/feed, and where
the module exists tags/view (eztags) and newsletter subscribe, configure, unsubscribe and archive
(cjw_newsletter). A policy the role has in any form (also limited, or module/*) is left alone, so
the script can run again. Prints PASS or FAIL at the end.
Without --apply nothing is written: the script lists what it would add. --dry-run is still accepted
and means the same as no flag; --apply together with --dry-run is a usage error (exit 2).
Example: php bin/php/addanonymouspublicpolicies.php
php bin/php/addanonymouspublicpolicies.php --apply
php bin/php/addanonymouspublicpolicies.php --apply --only=user/register
php bin/php/addanonymouspublicpolicies.php --apply --skip=user/register --role=Visitors
Options:
--apply Write the changes (the default is a dry run that lists them and changes nothing)
--dry-run The default, kept for scripts that pass it: list what would be added, change nothing
--role=VALUE The role to complete (ID or name); default Anonymous
--only=VALUE... Only this policy (module/function), may be repeated
--skip=VALUE... Never this policy (module/function), may be repeated; e.g. --skip=user/register keeps registration closedOptions
| Option | Value | Description |
|---|---|---|
| --apply | - | Write the changes (the default is a dry run that lists them and changes nothing) |
| --dry-run | - | The default, kept for scripts that pass it: list what would be added, change nothing |
| --role | required | The role to complete (ID or name); default Anonymous |
| --only | required | Only this policy (module/function), may be repeated |
| --skip | required | Never this policy (module/function), may be repeated; e.g. --skip=user/register keeps registration closed |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/addanonymouspublicpolicies.php, kernel/private/classes/commands/addanonymouspublicpolicies.php
See also
Generated example: exp:addanonymouspublicpolicies
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment