[Jifty-commit] r4918 - in jifty/trunk: lib/Jifty/Plugin/REST

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Jan 24 05:55:51 EST 2008


Author: sartak
Date: Thu Jan 24 05:55:50 2008
New Revision: 4918

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm

Log:
 r50706 at onn:  sartak | 2008-01-24 05:55:35 -0500
 BEHAVIOR CHANGE: REST will now list visible actions, not just runnable actions.
 This is because you generally want to disable actions during GET, but that
 breaks GET /=/action/
 
 So if you have actions you really mean to hide, then you'll need to update your application.


Modified: jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	Thu Jan 24 05:55:50 2008
@@ -379,7 +379,7 @@
 =cut
 
 
-sub action {  _resolve($_[0], 'Jifty::Action', Jifty->api->actions) }
+sub action {  _resolve($_[0], 'Jifty::Action', Jifty->api->visible_actions) }
 
 =head2 model MODEL
 
@@ -754,12 +754,12 @@
 
 =head2 list_actions
 
-Returns a list of all actions allowed to the current user. (Canonicalizes Perl::Style to Everything.Else.Style).
+Returns a list of all actions visible to the current user. (Canonicalizes Perl::Style to Everything.Else.Style).
 
 =cut
 
 sub list_actions {
-    list(['action'], map {s/::/./g; $_} Jifty->api->actions);
+    list(['action'], map {s/::/./g; $_} Jifty->api->visible_actions);
 }
 
 =head2 list_action_params


More information about the Jifty-commit mailing list