How to make a session to resolve another project?

I plan to do project management using PHP / MySQL / Codeigniter.

He will have 10 - 20 users and 20 - 30 projects taking place simultaneously.

Let's say that John is a member of projects A, B and C. Cindy is in A, D, FG, etc.

I want only the project project to be able to access the project.

Now I'm not sure how to approach this.

What do you offer in terms of design and database session.

Any resources would be appreciated.

+4
source share
3 answers

You can use Zend_Acl with Codeigniter , or you can try EzAuth

+3
source

If you do not want to use the solution for the platform:

  • There are user, project, and UserProject tables.

  • For each project, the user is included, the UserProject table will have a user ID and a project identifier in a row.

  • When creating a session, you can pull UserProject from the table to find which projects are valid (and, for example, put them in an array that can be found when the navigation is displayed).

  • In addition, each project can have a user set as an administrator, which can add other users.

+4
source

Regarding session storage, I can recommend memcached. There is a PHP function that allows you to set your own session handler. Do not save sessions in a real database. This will add extra overhead.

I can’t tell a lot about the design of the database, since your mail does not contain essential information. Therefore, I would just say create two tables: “User” and “Project”. A “user” consists of column identifiers, name and email. The project consists of a column identifier, user identifier (foreign key, if the DBMS is supported), name, etc.

+1
source

All Articles