Hi folks :) I´ve been thinking about this for a while, and didn´t come to a reasonable solution. I´d like to build a dialog, in which a user can select a group of people who can visit an article (or anything else). There should be 4 choices: - only me - only these people: <select> with all people for multi-select - only this group of people: <some groups of people that can change afterwards> - everyone How could this information be stored in the database as redundancy-free as possible? - create groups for everything (group with 1 person, group with select contents, group with all people) - store it in CSV in the table?! - map people to articles Every choice has its flaws.... perhaps if a group changes, the changes won´t be reflected to the permissions and so on... (the feature is 1:1 from basecamp etc., as i heard) :) Someone got an idea? Greets Jonas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sep 23, 8:50 pm, "Jonas Schneider" <js.sokra...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi folks :) > > I´ve been thinking about this for a while, and didn´t come to a reasonable > solution. > > I´d like to build a dialog, in which a user can select a group of people who > can visit an article (or anything else). There should be 4 choices: > - only me > - only these people: <select> with all people for multi-select > - only this group of people: <some groups of people that can change > afterwards> > - everyone > > How could this information be stored in the database as redundancy-free as > possible? > - create groups for everything (group with 1 person, group with select > contents, group with all people) > - store it in CSV in the table?! > - map people to articles > > Every choice has its flaws.... perhaps if a group changes, the changes won´t > be reflected to the permissions > > and so on... > > (the feature is 1:1 from basecamp etc., as i heard) :) > > Someone got an idea? > > Greets > Jonasnoone got an idea? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think I would use a table called for example "permissions" and it will have a user_id, a group_id and an article_id. If user_id and article_id exists in this table user_id is allowed to read the article. The same for the group. Each item in the table will have a user_id or a group_id but not both. What do you think about this solution? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---