-
I think the module needs it's own permission set. Primarily "Assign Workbench Reviewer" and "Be Assigned Workbench Reviewer". That would be more in line with how the rest of the suite works.
-
"Assign" would control who can see and use the field / form element. Use hook_entity_field_access().
-
"Be assigned" would control who can be selected and who can use the Workbench tab.
Adding the "Be assigned" gives more control and creates some complexity.
I think the module needs it's own permission set. Primarily "Assign Workbench Reviewer" and "Be Assigned Workbench Reviewer". That would be more in line with how the rest of the suite works.
"Assign" would control who can see and use the field / form element. Use hook_entity_field_access().
"Be assigned" would control who can be selected and who can use the Workbench tab.
Adding the "Be assigned" gives more control and creates some complexity.
The list of who can be assigned should be alterable by other modules after creation -- think Workbench Access integration.
Filtering the entity_reference autocomplete by permission requires, I believe, the creation of a new Field Widget. See https://github.com/agentrickard/workbench_access/blob/8.x-1.x/src/Plugin/EntityReferenceSelection/UserFilteredSelection.php for an example.