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
| Name | Type | Description |
|---|---|---|
| $allow_logged_out | bool | Allow the capability check or bail without even checking. Default: false. |
| $caps_to_check | string|array | Single capability or array of capabilities to check against. |
| $object_id | int|null | Parameter can be used to check for capabilities against a specific object, such as a post or user. |
| $user_id | int|null | Check 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