Slackbot
11/12/2025, 5:15 PMAsk Inkeep
11/12/2025, 5:15 PMAsk Inkeep
11/12/2025, 5:15 PMresource.time > "17:00"
Creating Resource Sets via SDK
Using the Permit.io SDK, you can create resource sets programmatically (3) (4) :
await permit.api.conditionSets.create({
key: "departmental_hierarchy",
name: "Departmental Hierarchy",
type: "resourceset",
resource_id: "Document",
conditions: {
allOf: [
{
"resource.department": {
equals: { ref: "user.department" },
},
},
],
},
}) ;
(3)
Another example for owned resources (4) :
await permit.api.conditionSets.create({
key: "owned_plans",
name: "Owned Plans",
type: "resourceset",
resource_id: "plan",
conditions: {
allOf: [
{ allOf: [{ "resource.owner": { equals: { ref: "user.key" } } }] },
],
},
}) ;
Resource sets group resources based on their attributes, enabling precise control over access by combining resource attributes with conditions (1) (2) .Ask Inkeep
11/12/2025, 5:15 PM