Brewtiful Beans Meets Warden, Part 2: Opening the Holiday Shift
Dana’s message arrives at 8:02 on Monday morning: Maya and Alex start today. Can they log in by ten?
Maya will work Support cases and cover the sales line on weekends. Alex is sales only. In Setup, that is two users, three permission sets, a public group, a queue, and a fair chance that Joe misses one of them before his coffee kicks in.
Last week, Joe promoted the Support and SalesRep personas to production. Now he writes down who gets what:
[
{ "Username": "maya@brewtifulbeans.example", "FirstName": "Maya", "LastName": "Chen",
"personas": ["SalesRep", "Support"] },
{ "Username": "alex@brewtifulbeans.example", "FirstName": "Alex", "LastName": "Kim",
"personas": ["SalesRep"] }
]
(Excerpt: a real file also carries email, profile, and the other fields a new user needs.)
Preview, then pour
Joe runs it with --dry-run first. Warden merges each user’s personas into a single effective set of access and prints the plan. Nothing is written. The plan looks right, so he runs it for real:
sf warden provision --users-def hires.json --persona-source org \
--log-to-org --no-prompt --target-org bb-prod
Persona source: org
maya@brewtifulbeans.example · 005Hs00000Mx7Qa · created
unmatched Username = maya@brewtifulbeans.example · personas: SalesRep, Support
action: created
action: activated
action: assignedPermissionSet
action: addedPublicGroupMember
action: addedQueueMember
alex@brewtifulbeans.example · 005Hs00000Ak4Rb · created
unmatched Username = alex@brewtifulbeans.example · personas: SalesRep
action: created
action: activated
action: assignedPermissionSet
action: addedPublicGroupMember
Processed 2 users: 2 created, 0 updated, 0 failed.
--persona-source org reads the personas from warden-base rather than from a local file. Maya gets both bundles. Reports_Viewer appears in both, and Warden assigns it once.
The receipt
--log-to-org is the part Joe will be glad of in March. Warden writes each grant to a ledger in the org, recording which persona granted which access:
sf data query -q "SELECT wdn_Persona__r.Name, wdn_Type__c, wdn_Target_Label__c
FROM wdn_Provisioned_Grant__c WHERE wdn_User__r.FirstName = 'Maya'" -o bb-prod
SalesRep PermissionSet Sales_Console
SalesRep PermissionSet Reports_Viewer
SalesRep PublicGroup Sales_Team
Support PermissionSet Service_Console
Support PermissionSet Reports_Viewer
Support Queue Support_Cases
When someone asks why Maya can see the Support queue, the answer is a query, not a guess.
At 9:14, Joe replies to Dana: Done. He finishes his coffee while it is still hot.
Write down who gets what once, then let the command do the clicking.
Warden homepage · CLI source · sf plugins install @syntax-syllogism/warden