Roles Management

We assume that pass and pass-team have been initialized as shown in fresh_setup.md

Create some roles:

pass team role create developer manager
Created role 'developer'.
Created role 'manager'.

Assign some subjects to the roles:

pass team role assign developer passt-user1
Assigned role 'developer' to subject 'passt-user1'.
pass team role assign manager passt-user2
Assigned role 'manager' to subject 'passt-user2'.

Show particular roles:

pass team role show developer
Role: developer
└── GPG Keys:
    └── 2EB575B01291CDF4 ── passt-user1

Remove a role:

pass team role create dummy-role
Created role 'dummy-role'.
pass team role remove dummy-role
Removed role 'dummy-role'.

List all roles:

pass team role list
Roles
├── developer
└── manager

Unassign a subject:

pass team role assign developer passt-user2
Assigned role 'developer' to subject 'passt-user2'.
pass team role unassign developer passt-user2
Unassigned role 'developer' from subject 'passt-user2'.

Error handling:

pass team role assign unknown-role passt-user1
Error: The role 'unknown-role' does not exist.
       Please add it to your pass team.

(exit 86)
pass team role assign developer unknown-subject
Error: The public key of 'unknown-subject' is unknown.        
       Please add it to your gpg keyring.

(exit 84)

Generated from roles_management.sh