CREATE OR REPLACE VIEW wf_ac_perms_v AS
SELECT ac.ns_id, ac.group_id, gu.user_id, ac.role_id, rdas.doctype_id, rdas.docaction_id
FROM wf_access_contexts ac
JOIN wf_group_users gu ON ac.group_id = gu.group_id
JOIN wf_role_docactions rdas ON ac.role_id = rdas.role_id;

CREATE OR REPLACE VIEW wf_ac_perms_v AS
SELECT ac_grs.ns_id, ac_grs.group_id, gu.user_id, ac_grs.role_id, rdas.doctype_id, rdas.docaction_id
FROM wf_ac_group_roles ac_grs
JOIN wf_group_users gu ON ac_grs.group_id = gu.group_id
JOIN wf_role_docactions rdas ON ac_grs.role_id = rdas.role_id;

Update view definition to match renamed access context group roles table
Update view definition to match renamed access context group roles table
