Do I need authorization?

4 views
Skip to first unread message

pic

unread,
Nov 10, 2009, 7:38:01 AM11/10/09
to Rails Authorization Plugin
I'm using authlogic for authentication. I'm testing Rails
Authorization Plugin now. My question is, do I even *need* an
authorization plugin? I want to keep this as simple as it can be.
Below are my most complex requirements for a RockBands community. Can
I just rely on basic rails associations for my authorization control?

--------------------------------
1.) The Authentic Jon
--------------------------------
User "Jon Smitty" has a single login to the "RockBands" website. Call
this his BASEPROFILE because it just contains his real name, contact
info, credit card, and login credentials.
Only Jon should have access to Jon's BASEPROFILE.

--------------------------------
2.) Jon's Roles
--------------------------------
Jon can add roles to his base profile, and these roles are complex
enough I think that they should be defined as separate classes.

Jon is MUSICIAN for the "WoodHousePilots" BAND, with :stagename =>
'bird'.
Jon is MUSICIAN for the "BlackFlyPleas" band too, with :stagename =>
'twang'. So he's a member of two bands.
Bird, Twang, and Jon all have a CALENDAR of events. Jon's CALENDAR is
just a role-up from his Bird and Twang roles.

--------------------------------
3.) Joint Ownership of Contracts
--------------------------------
Jon is BANDMANAGER for "IceColdChiliPeppers", which gives him access
to every "Contract" of that band.
Tim is a CLUBOWNER who has authored a CONTRACT with Jon. They both
need edit access to this document.


BASEPROFILE has_many MUSICIANS; MUSICIAN belongs_to BASEPROFILE
BASEPROFILE has_many BANDMANAGERS; BANDMANAGER belongs_to BASEPROFILE
BASEPROFILE has_many CLUBOWNERS; CLUBOWNER belongs_to BASEPROFILE
BAND has_many MUSICIANS; MUSICIAN has_many BANDS
BAND has_one BANDMANAGER; BANDMANAGER belongs_to BAND
CONTRACT has_one BANDMANAGER; BANDMANAGER has many CONTRACTS
CONTRACT has_one CLUBOWNER; CLUBOWNER has_many CONTRACTS
Reply all
Reply to author
Forward
0 new messages