Hi,
In Yii I am doing a small application. Where my database is something like this
==================================
| mspl_sales |
==================================
+ id (pk) +
+ product_id (fk) +
+ store_id (fk) +
+ discount_id (fk) +
+ agent_id (fk) +
+ date (datetime) +
+ price (float) +
+ discount_percentage (float) +
+ created_by(int) +
+ updated_by(int) +
+ created_at(datetime) +
+ updated_at(datetime) +
+++++++++++++++++++++++++++++++++++
=====================================
mspl_requistitations
=====================================
+ id (pk) +
+ store_id (fk) +
+ product_id (fk) +
+ agent_id (fk) +
+ date (datetime) +
+ requisition_number (varchar(45)) +
+ procure_quantity (varchar(45)) +
+ balance_store_stock (varchar(45)) +
+ priority (varchar(45)) +
+ created_by (int) +
+ updated_by (int) +
+ created_at (datetime) +
+ updated_at (datetime) +
++++++++++++++++++++++++++++++++++++++
===============================
mspl_products
===============================
+ id (pk) +
+ product_name (varchar(45)) +
+ cost_price (float) +
+ selling_price (float) +
+ created_by (int) +
+ updated_by (int) +
+ created_at (datetime) +
+ updated_at (datetime) +
+++++++++++++++++++++++++++++++
==============================
mspl_stores
==============================
+ id(pk) +
+ store_name (varchar(45)) +
+ store_locationn (varchar(45))+
+ created_by (int) +
+ updated_by (int) +
+ created_at (datetime) +
+ updated_at (datetime) +
++++++++++++++++++++++++++++++++
================================
mspl_discounts
================================
+ id (pk) +
+ discount_type (varchar(45)) +
+ created_by (int) +
+ updated_by (int) +
+ created_at (datetime) +
+ updated_at (datetime) +
+++++++++++++++++++++++++++++++
=========================================
mspl_agents
=========================================
+ id (pk) +
+ user_name (varchar(45)) +
+ email_id (varchar(45)) +
+ agent_code (varchar(45)) +
+ authorization_password (varchar(45))+
+ created_by (int) +
+ updated_by(int) +
+ created_at(datetime) +
+ updated_at(datetime) +
++++++++++++++++++++++++++++++++++++++++++
For user I have taken yii user extensions. But as per my application requirement I need two kinds of roles.One for the admin where he should have access for every forms and table(CRUD) and another role for agent where he will have only access to mspl_requistitations(CRUD).
So can someone kindly tell me how to set the roles to the user modules for this two kind of roles? Any help and suggestions will be really appreaciable. Thanks