CPS and its submodules integrate nicely into the entity access system so that if you call entity_access(), CPS restrictions (such as the inability to edit entities in the published changeset) are automatically respected.

However, there are times when you might want to know whether a user has access to do something, irrespective of the current changeset and other CPS restrictions. (For example, you may want to know if a user is able to edit an entity in general, regardless of whether the current active changeset allows them to edit it right now.)

It would be useful to provide an API function that achieves that goal, especially because it's difficult to do correctly.

Comments

David_Rothstein created an issue. See original summary.

David_Rothstein’s picture

Here's a patch, plus a "do not test" patch that applies on top of #2690269: Allow sites to opt out of CPS's deletion policy.

hadsie’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.