views:

70

answers:

3

I am planning to make a project management with PHP/MySQL/Codeigniter.

It will have 10 - 20 users and 20 - 30 projects going on at the same time.

Let's say John is a member of project A, B and C. Cindy is in A, D, F G etc.

I want to make it only members of project can access the project.

Now I am not sure how to approach this.

What do you suggest in terms of DB-design and session.

Any resources will be appreciated.

+3  A: 

You can use Zend_Acl with Codeigniter or you could try EzAuth

Peter Lindqvist
+3  A: 

If you don't want to use a framework solution:

  1. Have User, Project, and UserProject tables.

  2. For every project a user is on, the UserProject table will have the UserID and the Project ID in a row.

  3. When creating the session, you can pull from the UserProject table to find what projects are allowable (and for example, put them in an array that can be searched when navigation is shown).

  4. Additionally, Each project could have a user set as admin that can add other users.

Cryophallion
A: 

As for session storage, I can recommend memcached. There is a PHP function that enables you to set your own session handler. Do not save sessions into a real database. It would add unncessary overhead.

I cannot tell you much about the database design as your post is lacking substantial information. Therefore I would just say, create two tables, "User" and "Project". "user" is made up of the columns ID, Name and E-Mail. Project consists of the columns ID, User ID (foreign key if supported by DBMS), Name etc.