Skip to content

Commit

Permalink
Integrate grant/removeAccess to one rule
Browse files Browse the repository at this point in the history
  • Loading branch information
helamanl0424 authored Apr 11, 2024
1 parent ba20d7f commit e1d5fe1
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions samples/sample.krl
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ ruleset sample_app {
pods:authenticate()
}

rule test_store_file {
rule store_file {
select when sample_app store_file
pods:overwrite(event:attrs.get("originURL"), event:attrs.get("destinationURL"), event:attrs.get("doAutoAuth"))
}

rule test_overwrite_file {
rule overwrite_file {
select when sample_app overwrite_file
pods:overwrite(event:attrs.get("originURL"), event:attrs.get("destinationURL"), event:attrs.get("doAutoAuth"))
}
Expand Down Expand Up @@ -84,13 +84,9 @@ ruleset sample_app {
send_directive(pods:getPublicAccess(event:attrs.get("resourceURL")))
}

rule grant_access {
select when sample_app grant_access
pods:grantPublicAccess(event:attrs.get("resourceURL"))
}
rule remove_access {
select when sample_app remove_access
pods:removePublicAccess(event:attrs.get("resourceURL"))
rule set_public_access {
select when sample_app set_public_access
pods:setPublicAccess(event:attrs.get("resourceURL"), event:attrs.get("read"), event:attrs.get("write"), event:attrs.get("append"))
}

rule ls {
Expand Down

0 comments on commit e1d5fe1

Please sign in to comment.