Skip to the content
Documentation

exp:accesscheck

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Check what a user may do with a node or object (content/read, edit, ...) and which limitation refuses it

Usage

./console exp:accesscheck [options]
php bin/php/accesscheck.php [options]
./console exp:access:check [options]

Aliases

exp:access:check

Help

The output of ./console help exp:accesscheck (the script run with --help), without the standard options:

Usage: bin/php/accesscheck.php [OPTION]...
Access check for a user
Whether a user may read, edit, remove ... a node or an object, decided as the views decide
it, and when not, the policies and the limitation that refused, those of extensions
included. Nobody signs in and nothing is changed.

./console exp:access:check --user=editor --node=2
./console exp:access:check --user=14 --object=57 --function=edit --language=eng-GB
./console exp:access:check --user=anonymous --node=2 --json

Functions: read, edit, remove, pdf, diff, view_embed, translate, manage_locations, hide (default read).
Ends with ALLOWED (exit 0) or DENIED (exit 1); exit 2 when the user, node or object is not found.


Options:
  --user=VALUE      The user: its content object ID or its login; "anonymous" for the anonymous user
  --node=VALUE      The node ID to check
  --object=VALUE    The object ID to check (instead of a node)
  --function=VALUE  The content function (default read)
  --language=VALUE  A language code, for edit and translate
  --json            One JSON object instead of the text

Options

Option Value Description
--user required The user: its content object ID or its login; "anonymous" for the anonymous user
--node required The node ID to check
--object required The object ID to check (instead of a node)
--function required The content function (default read)
--language required A language code, for edit and translate
--json - One JSON object instead of the text

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/accesscheck.php, kernel/private/classes/commands/accesscheck.php

See also

Generated example: exp:accesscheck

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.