- Issue created by @abelpzl
VBO 4.3.2 and Drupal 11.
I need to show a custom action to a specific role.
In the module readme it is not mentioned, but in this guide → it is mentioned that you can use the "requirements" to show the action to a given permission, this does not work for me.
requirements: an array of requirements that must be met to make the action available. Possible options:
_permission - if user has that permission, the action will be displayed in the options select list.
_custom_access - if set to TRUE, action's customAccess method will be called to determine if the current user can run the action on a specific object/ entity (see ViewsBulkOperationsActionBase for a default implementation). If FALSE or not defined, the customAccess method will not be called.
This is my plugin annotation.
/**
* Action description.
*
* @Action(
* id = "generate_x_report",
* label = @Translation("Generate the report"),
* type = "",
* requirements = {
* "_permission" = "permission to generate x report",
* },
* )
*/
Users without the permission "permission to generate x report" can also see "Generate the report" option of vbo.
Am I wrong about this?
I don't know if this is a bug or the documentation is wrong.
Active
4.3
Actions