[dancer-users] Dancer::Plugin::Auth::Extensible - removing sub attributes - ready to try out
David Cantrell
david at cantrell.org.uk
Tue Dec 18 16:09:47 GMT 2012
On 15/12/2012 19:20, David Precious wrote:
> get '/foo' => requires_role ['Foo','Bar'] => sub { ... };
>
> (requires_roles could be added as an alias, so code could read better.)
>
> I imagine the common requirement will be to say "any of these roles",
> not "all of these roles". I was considering whether requires_role
> should be for "must have this role" or "must have all of these roles",
> and e.g. a new requires_any_role keyword would be added to ensure a
> user had all the specified roles; I'm not sure how valuable that would
> be, though.
You definitely need to be able to support any and all. Which is the
default doesn't really matter IMO. I suggest also letting the user
supply their own authentication sub so that they can implement exotica
like "must be cleared for Case Nightmare Green and be ranked Major or
higher".
--
David Cantrell | top google result for "internet beard fetish club"
It's my experience that neither users nor customers can articulate
what it is they want, nor can they evaluate it when they see it
-- Alan Cooper
More information about the dancer-users
mailing list