# Selection of groups of people

**URL:** <https://www.ruby-forum.com/t/selection-of-groups-of-people/115319>\
**Category:** Rails\
**Created:** [September 23, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/selection-of-groups-of-people/115319 "2007-09-23T20:50:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonas\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Post date:** [September 23, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/selection-of-groups-of-people/115319/1 "2007-09-23T20:50:59Z")

</div>

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: with all people for multi-select
- only this group of people: 
- 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

---

<div class="post-metadata">

**Author:** ![jonas\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Post date:** [September 25, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/selection-of-groups-of-people/115319/2 "2007-09-25T21:03:38Z")

</div>

On Sep 23, 8:50 pm, “Jonas S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> afterwards\>  
> 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

noone got an idea?

---

<div class="post-metadata">

**Author:** ![jonas\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dfb087/32.png) [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Post date:** [September 25, 2007, 10:17pm UTC](https://www.ruby-forum.com/t/selection-of-groups-of-people/115319/3 "2007-09-25T22:17:02Z")

</div>

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?
