Namespaces support

15 views
Skip to first unread message

Dmitry Polushkin

unread,
May 27, 2009, 9:01:19 AM5/27/09
to declarative_authorization
To support it simple change this line:

context = @context || contr.class.controller_name.to_sym

to

context = @context || contr.class.controller_path('/', '_').to_sym

Dmitry Polushkin

unread,
May 27, 2009, 9:05:18 AM5/27/09
to declarative_authorization
typo:

context = @context || contr.class.controller_path.gsub('/',
'_').to_sym

On May 27, 2:01 pm, Dmitry Polushkin <dmitry.polush...@gmail.com>
wrote:

Steffen Bartsch

unread,
May 27, 2009, 1:23:14 PM5/27/09
to declarative_...@googlegroups.com, Dmitry Polushkin
Am Mittwoch, 27. Mai 2009 schrieb Dmitry Polushkin:
> context = @context || contr.class.controller_path.gsub('/',
> '_').to_sym

I would be glad to have decl_auth support namespaces. I am not sure about the
consequences of this change, though. Could you provide test cases for this
approach, e.g. in a forked repository so that I can pull from there?

An alternative to this code change is to give the context in the
filter_access_to call as an option.

Steffen

Dmitry Polushkin

unread,
May 28, 2009, 5:42:34 AM5/28/09
to declarative_authorization
Thanks Steffen for the answer. I will try to provide code with tests
in 2 weeks.

fturtle

unread,
Jun 21, 2009, 10:45:48 AM6/21/09
to declarative_authorization
Any update on this? I'm after namespace support too!

Thanks,
fturtle

On May 28, 10:42 am, Dmitry Polushkin <dmitry.polush...@gmail.com>
wrote:

tobmatth

unread,
Jun 23, 2009, 4:55:07 AM6/23/09
to declarative_authorization
+ 1
Reply all
Reply to author
Forward
0 new messages