Best login method (Module Access)
<p>I'm working to develop a login module, but I'm not sure if this method is best way.</p>

<p>I have 3 modules: Clients, Account Payable and Account Receivable
Each module have a table CLIENTS, AP, AR. Ok to this point.</p>

<p>I need to limit users to access into specific module, and allow specific actions, (Read, Add, Modify, Delete)</p>

<p>I'm working on this way:</p>

<p>Created USERS table:</p>

<pre><code>1) John

2) Mike
</code></pre>

<p>Created a MODULE table</p>

<pre><code>1) Clients

2) AP

3) AR
</code></pre>

<p>Create ACCESS PROFILE table</p>

<pre><code>id 1 user_id 1 user_module 1 read 1 add 0 modify 0 delete 0

id 2 user_id 2 user_module 1 read 1 add 0 modify 0 delete 0

id 3 user_id 2 user_module 2 read 1 add 1 modify 1 delete 1
</code></pre>

<p>In this case:
User 1 have only read access to clients table
User 2 have access to read clients table and full access on Account Payable (Read, Add, Modify, Delete)</p>

<p>My question is, i'm on the right way os exist a better method?</p>

<p>I hope explained good :-?</p>

<p>Thanks All</p>
