Skip to content

Commit

Permalink
Integrate grant/removeAgentAccess rule into one rule
Browse files Browse the repository at this point in the history
  • Loading branch information
helamanl0424 authored Apr 11, 2024
1 parent c393025 commit 6d462c1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions samples/sample.krl
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,11 @@ ruleset sample_app {
send_directive(pods:getAllAgentAccess(event:attrs.get("resourceURL")))
}

rule grant_agent_access {
select when sample_app grant_agent_access
pods:grantAgentAccess(event:attrs.get("resourceURL"), event:attrs.get("webID"))
rule set_agent_access {
select when sample_app set_agent_access
pods:setAgentAccess(event:attrs.get("resourceURL"), event:attrs.get("webID"), event:attrs.get("read"), event:attrs.get("write"), event:attrs.get("append"))
}

rule remove_agent_access {
select when sample_app remove_agent_access
pods:removeAgentAccess(event:attrs.get("resourceURL"), event:attrs.get("webID"))
}

rule get_public_access {
select when sample_app get_public_access
send_directive(pods:getPublicAccess(event:attrs.get("resourceURL")))
Expand Down

0 comments on commit 6d462c1

Please sign in to comment.