Problem/Motivation
Workflow is a very robust and powerful module. Part of what makes it so powerful is the Workflow Access module that comes built in with Workflow.
At present the benefit of Workflow field being compatible with ECK entities is limited because of the lack of access control support. It would be tremendously beneficial to have entity (particularly ECK entity) support for Workflow Access.
Proposed resolution
Add support for ECK entities in Workflow Access.
Remaining tasks
User interface changes
API changes
https://www.drupal.org/docs/8/api/entity-api/working-with-the-entity-api
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
Comments
Comment #1
rbrownellComment #2
rbrownellComment #3
Zekvyrin CreditAttribution: Zekvyrin commentedThis is an issue I would also like to have it solved.
Unfortunately I haven't found a generic way to affect all entities, because (other) entities are defined using hook_entity_info and they may set their custom 'access callback'.
Fortunately (kinda) for my case (entityform) there is a hook_entityorm_access_alter and by using that in a custom module I made my installation support workflow access for entityform.
The code I used is below:
Note that I wanted to override previous access set by entityform_access if there is a workflow field in it.
In case that you want to grant access to someone who previously didn't have, you may uncomment the if (!$access) clause (and possibly comment "$access = FALSE;" because it would be already set to FALSE so it won't be needed for this case).
Hope it saved some time to someone, until a better solution is found.
Comment #4
johnvComment #5
johnvworkflow_access is now ported to D8, so, this issue is moved to the highest version.
Comment #6
bradflewelling CreditAttribution: bradflewelling commentedHas there been any development for this issue over the last couple years? I'm using custom entities and workflow access doesn't seem to be enforcing the permissions that i set for them. Any suggestions?
Comment #7
johnvComment #8
johnvComment #9
mhmd CreditAttribution: mhmd as a volunteer and commentedI have the same issue on latest drupal 8 release of that module
Comment #10
johnvComment #11
johnv