diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-29 16:15:19 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-29 16:15:19 +0000 |
commit | 7650c092243cf35214fd049a83c4c548990d3e72 (patch) | |
tree | 97ceaf63c00a052708daa23ca53ded108dbe6fd4 | |
parent | 0328e248243c091efbfef06d6b4370ae08107cbe (diff) |
rss plugin: manageable permissions and defaults
-rw-r--r-- | data/rbot/plugins/rss.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index c9231dad..ac47a04c 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -993,6 +993,9 @@ end plugin = RSSFeedsPlugin.new
+plugin.default_auth( 'edit', false )
+plugin.default_auth( 'edit:add', true)
+
plugin.map 'rss show :handle :limit',
:action => 'show_rss',
:requirements => {:limit => /^\d+(?:\.\.\d+)?$/},
@@ -1008,23 +1011,31 @@ plugin.map 'rss who watches :handle', :defaults => {:handle => nil}
plugin.map 'rss add :handle :url :type',
:action => 'add_rss',
+ :auth_path => 'edit',
:defaults => {:type => nil}
plugin.map 'rss change :what of :handle to :new',
:action => 'change_rss',
+ :auth_path => 'edit',
:requirements => { :what => /handle|url|format|type|refresh/ }
plugin.map 'rss change :what for :handle to :new',
:action => 'change_rss',
+ :auth_path => 'edit',
:requirements => { :what => /handle|url|format|type|refesh/ }
plugin.map 'rss del :handle',
+ :auth_path => 'edit:rm!',
:action => 'del_rss'
plugin.map 'rss delete :handle',
+ :auth_path => 'edit:rm!',
:action => 'del_rss'
plugin.map 'rss rm :handle',
+ :auth_path => 'edit:rm!',
:action => 'del_rss'
plugin.map 'rss replace :handle :url :type',
+ :auth_path => 'edit',
:action => 'replace_rss',
:defaults => {:type => nil}
plugin.map 'rss forcereplace :handle :url :type',
+ :auth_path => 'edit',
:action => 'forcereplace_rss',
:defaults => {:type => nil}
plugin.map 'rss watch :handle [in :chan]',
@@ -1039,4 +1050,3 @@ plugin.map 'rss rmwatch :handle [in :chan]', :action => 'unwatch_rss'
plugin.map 'rss rewatch',
:action => 'rewatch_rss'
-
|