Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:addoauthauthorizepolicy

Grant oauth/authorize to the roles that let users sign in (6.0.15 upgrade; dry run unless --apply).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/addoauthauthorizepolicy.md

On this page

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 --help

Help 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=5

Options

OptionValueHelp
--applyWrite the changes (the default is a dry run that lists them and changes nothing)
--dry-runThe default, kept for scripts that pass it: list what would be granted, change nothing
--rolerequiredOnly 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 ...).


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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x