vcfa_project_user

VCF Automation — project membership.

VCFA stores project membership as four arrays on the project document:

  • administrators

  • members

  • viewers

  • supervisors

Each entry has shape {"email": "user@example.com", "type": "user"|"group"}. This client mutates membership via PATCH on the project so callers don’t have to GET/edit/PATCH themselves.

saltext.vcf.clients.vcfa_project_user.list_members(opts, project_id, role=None, profile=None)[source]

Return the membership of the project.

If role is given, return just that role’s array. Otherwise return a dict mapping each role to its array.

saltext.vcf.clients.vcfa_project_user.add_member(opts, project_id, role, email, *, member_type='user', profile=None)[source]

Add an entry to a project role. Idempotent — no-op if already present.

saltext.vcf.clients.vcfa_project_user.remove_member(opts, project_id, role, email, profile=None)[source]

Remove an entry from a project role. Idempotent — no-op if absent.

saltext.vcf.clients.vcfa_project_user.set_members(opts, project_id, role, emails, *, member_type='user', profile=None)[source]

Replace a role’s membership wholesale.

emails is the full desired list; this call PATCHes the project with {role: [{email, type}, ...]}.