[Radiant] Role Based Access Control extension
Casper Fabricius
me at casperfabricius.com
Mon Feb 4 02:13:49 CST 2008
Hi Jim,
> I've been debating on re-using the existing users model versus
> creating a new 'members' model. If anyone has done something like
> this, I'd love to hear your though
There is one thing I can recommend you NOT to do, and this make an
inherited user model (i.e. "class Member < User"). I tried that on a
Radiant-based project, and it was a headache.
For another site I've reused the Radiant user model, adding fields to
the users table as needed. There is, however, some things to be aware
of:
1) You must seal of all admin controllers for ordinary users (non dev
or admin) - I do it like this: http://pastie.caboo.se/147172
2) You should code your own Users- and Session-controllers for
registration and login to avoid mixing up with the Radiant admin pages.
It works for me, and I like not having to deal with two different
models covering the same concept, but you have to do a bit of
metaprogramming in your extension(s) to add stuff to existing Radiant
code. You might find it easier to work with a seperate Member model,
but feel that my approach is DRY'er.
Cheers,
Casper Fabricius
casperfabricius.com
On 04/02/2008, at 8:18, J Aaron Farr wrote:
>
> Jim Gay <jim at saturnflyer.com> writes:
>
>> RBAC Base gives you the ability to grow beyond the standard roles in
>> Radiant, allowing you to build extensions around your own roles.
>
> Interesting.
>
> I've been wondering what other Radiant developers have been doing for
> general site users as opposed to admin users. If I'm reading the code
> right, this is still primarily aimed at users of the backend CMS.
>
> I've been debating on re-using the existing users model versus
> creating a new 'members' model. If anyone has done something like
> this, I'd love to hear your thoughts.
>
> --
> J Aaron Farr jadetower.com [US] +1 724-964-4515
> 馮傑仁 cubiclemuses.com [HK] +852 8123-7905
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
More information about the Radiant
mailing list