exp:addoauthauthorizepolicy
Grant oauth/authorize to the roles that let users sign in (6.0.15 upgrade; dry run unless --apply).
Script bin/php/addoauthauthorizepolicy.php, code in kernel/private/classes/commands/addoauthauthorizepolicy.php. Run it from the installation root, as the user the web server runs as:
./console exp:addoauthauthorizepolicy --help
php bin/php/addoauthauthorizepolicy.php --helpHelp text
Grant the policy oauth/authorize to every role that lets users sign in (user/login),
with the same siteaccess limitation, so the users who could authorize OAuth clients before 6.0.15
still can. Roles that have the policy already are left alone; the script can run again.
Prints PASS or FAIL at the end. Without --apply nothing is written: the script lists the roles it
would grant the policy to. --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/addoauthauthorizepolicy.php
php bin/php/addoauthauthorizepolicy.php --apply
php bin/php/addoauthauthorizepolicy.php --apply --role=Editor --role=5Options
| Option | Value | Help |
|---|---|---|
--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 granted, change nothing | |
--role | required | Only this role (ID or name), may be repeated; a listed role without user/login gets an unlimited policy |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/addoauthauthorizepolicy.php, kernel/private/classes/commands/addoauthauthorizepolicy.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.