Green message for access denied to perform actions

Created on 4 April 2022, over 2 years ago
Updated 31 October 2023, about 1 year ago

Problem/Motivation

I have this custom action:

/**
 * Assigns ownership of a node to a user.
 *
 * @Action(
 *   id = "my_custom_rule_node_assign_owner_action",
 *   label = @Translation("Assign the content to a new author"),
 *   type = "node"
 * )
 */

In its access function, i sometimes return

AccessResult::forbidden('The current user cannot assign nodes ownership.');

But when i do, i'd expect the message to be a warning one in stead of an information one. The reason is: when my users see a green message, they tend to think all went fine.

Am i returning something that is not valid, or is it so that somehow VBO is not creating warnings even when operations are not completed?

thanks

💬 Support request
Status

Active

Version

4.1

Component

Core

Created by

🇫🇮Finland joey-santiago

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇴Colombia davidlfg

    To date, the current version 4.2.5 of the module is not rendering the html correctly. Functionality that is really necessary for editors.

    I will temporarily add a short patch that allows me to render the html correctly.

  • Status changed to Active about 1 year ago
  • 🇵🇱Poland Graber

    Ohh, let's reopen then.

Production build 0.71.5 2024