Role Based Access Control extension

Hot on the heels of our Featured Pages extension is an update to RBAC
Base

SVN repo at http://www.saturnflyer.com/svn/radiantP/rbac_base/trunk

It was mentioned on the list months ago, but hadn’t received enough
attention (internally) to warrant putting it on the
http://wiki.radiantcms.org/Thirdparty_Extensions/
but it is there now.

RBAC Base gives you the ability to grow beyond the standard roles in
Radiant, allowing you to build extensions around your own roles.

It adds a roles table, a roles_users table, and creates the
has_and_belongs_to_many relationship between users and roles.

  • The drag/drop for the users is a little quirky, but it works (and
    will be updated in the future).
  • Does not yet provide a way to set the :visibility for your extensions
  • Role deletions sit dangerously behind a GET method, so beware, but
    we’ll be fixing that too.

This sounds awesome!! Can’t wait to try it! :slight_smile:

Cheers,
Mohit.
2/4/2008 | 12:41 PM.

Jim G. [email protected] 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 F. jadetower.com [US] +1 724-964-4515
馮傑仁 cubiclemuses.com [HK] +852 8123-7905

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 F.
casperfabricius.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs