Skip to main content

Filter: gravityview/capabilities/allow_logged_out

Shall we allow a cap check for non-logged in users? USE WITH CAUTION!

WARNING: This allows anyone to edit and delete entries, add notes, delete notes, etc!

If you use this filter, at least check against certain capabilities and $object_ids.

There are use-cases, albeit strange ones, where we'd like to check and override capabilities for a non-logged in user.

Examples, you ask? https://github.com/gravityview/GravityView/issues/826

Parameters

NameTypeDescription
$allow_logged_outboolAllow the capability check or bail without even checking. Default: false.
$caps_to_checkstring|arraySingle capability or array of capabilities to check against.
$object_idint|nullParameter can be used to check for capabilities against a specific object, such as a post or user.
$user_idint|nullCheck the capabilities for a user who is not necessarily the currently logged-in user.

Since

  • 1.21.5.2

Source

Defined in src/Permissions/RolesCapabilities.php at line 387