I usually handle role checking outside the functions as well, but what
I like with cffunction roles= is that it guarantees that the method is
not being accessed and executed by mistake/hack/lazy coding whatever.
When several people program against the same components, maybe in
different contexts and even applications, it is easy that some random
hack is left around that is using admin functions without proper
security check.
I went the other direction, from finding cflogin and roles useless to
thinking they actually do a decent job at component level. It's not
ideal, but you get a "standard" way of dealing with it without
creating a separate "standard" framework that everyone has to accept
and learn.
But regardless of it's usefulness, I think it is important to make it
clear that cffunction does not handle roles, in the compatibiliay
chart on the web page. It was a nasty surprise for me.
S
> <
stefan.vesterl...@googlemail.com> wrote:
> > Is the role system topic non grata here? All questions about that
> > subject is met with silence.
>
> I gave up using roles on function a long, long time ago (long before I
> started using Railo). The problem is that you just get a nasty
> exception at the call site and so your error handling options are
> limited and that leads to a poor user experience. The basic <cflogin>
> machinery is OK, sort of, for simple stuff but the roles stuff was
> never well thought out and many people think it's unusable.
>
> That's probably why no one ever responds to questions about roles on
> <cffunction> here. Very few users have requested that be added, BTW.
>
> Per Peter B, it does sound like a compatibility bug with
> isUserInAnyRole() so please add that to JIRA and it'll get addressed.
> That aspect of roles - programmatically checked - is just about usable
> in ACF although, like most other CFers, I tend to roll my own system
> using groups and permissions which is far more flexible.
> --
> Sean A Corfield -- (904) 302-SEAN
> Railo Technologies US --
http://getrailo.com/
> An Architect's View --
http://corfield.org/