Description of the need
A module may want to do something conditional on whether a role has a permission. Other functions can be used in a roundabout way, but this would be simpler.
Proposed solution
A simple function called user_role_has_permission that takes a role name and a permission name and returns a boolean if the role has the permission.
Alternatives that have been considered
For now, I've added this code in my module.
Is there a Drupal or Backdrop contributed module that accomplishes this? no
Additional information
Add any other information or screenshots that would help.
Draft of feature description for Press Release (1 paragraph at most)
Backdrop now includes an additional function for modules to check whether a user role includes a permission.
PR added at https://github.com/backdrop/backdrop/pull/4486
Recent comments
It's not about untranslated strings in Ubercart. I've been dealing with this problem for a month and as far I suppose, the problem is that these settings, which are made in admin/...
Multisite for multilingual website
I'm not able to reproduce on a clean install of Backdrop, and a view that displays nodes. The Configure View link is not shown to anonymous.
Errant "configure view" link is visible to anonymous users
Can you post an image showing this?
Errant "configure view" link is visible to anonymous users