Hi there,
i have a serious problem here. Let me explain my situation:
I have 3 Models: Group, Role, User Pretty self explaining. Every group has multiple roles (every group can define it's own roles. some have 3, some have 14 and so on..) and every role has many users through a join table.
Every group has some features like a public forum, a calender, public and private news and so on. I need to define Rules / Permissions like "roles which are allowed to post in the public forum", "roles which are allowed to create new events in the calender".... The Group admin can select 1-n roles which are allowed to do these actions. But how do i model these relations. I try to find a "good" design for this since a few days now and didn't find a answer. It would be possible to create a field for every "option" inside the groups table which stores a comma seperated list of roles... if you know what i mean. but this seems kind of "messy" to me.
there has to be an "intelligent", dynamic, RoR like way to handle this.
Any suggestions are welcome!
Thanks in advance,
Pascal