[Jifty-commit] r6662 - in jifty/trunk: lib/Jifty/Plugin/REST
Jifty commits
jifty-commit at lists.jifty.org
Wed Mar 18 15:30:50 EDT 2009
Author: sartak
Date: Wed Mar 18 15:30:49 2009
New Revision: 6662
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
Log:
r81384 at onn: sartak | 2009-03-18 15:30:37 -0400
Checking if the action is_allowed breaks some applications right now
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 Wed Mar 18 15:30:49 2009
@@ -428,7 +428,9 @@
name => $_[0],
base => 'Jifty::Action',
possibilities => [Jifty->api->visible_actions],
- is_allowed => sub { Jifty->api->is_allowed(shift) },
+# XXX: This does not quite work for some applications yet. Older versions of
+# the REST API did not have this explicit restriction.
+# is_allowed => sub { Jifty->api->is_allowed(shift) },
);
}
@@ -468,7 +470,7 @@
abort(404) if !defined($hit);
- abort(403) unless $args{is_allowed}->($hit);
+ abort(403) if $args{is_allowed} && !$args{is_allowed}->($hit);
return $hit;
}
More information about the Jifty-commit
mailing list