user groups and their permissions to manage site

FURichard

New Member
What would be the best way to grant certain actions/permissions to users based on their group? Let's say there are 3 groups - user, admin and accountant. User can do action1, admin - action1,2,3 ,accountant - action1 and 2. Could it be like this:\[code\]if(group == user){ action1(); //function }if(group == admin){ action1(); action2(); action3(); }if(group == accountant){ action1(); action2(); }\[/code\]All actions would be stored in functions.php file and then included in the page. Would it be a good idea or there is much better solution for this?
 
Back
Top