Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix logging

...

Code Block
languagejava
themeConfluence
  rule autoAccept {
    select when wrangler inbound_pending_subscription_added 
    pre{
      attributes = event:attrs().klog("subcription :");
      }
      noop();
    always{
      raise wrangler event "pending_subscription_approval"
          attributes attributes;        
      log  info  log("auto accepted subcription.");
    }
  }


Warning
titleSecurity Issues

 The preceding code shows a simple example of approving subscriptions automatically. This code, installed in a pico, would automatically subscribe to every pico that requests it.

Production code should be more circumspect about what subscriptions it accepts. For example, a pico might automatically accept any subscription request from its parent. Or any subscription request that contains a specific password.

...