Hi there,
I needed to manage a new kind of Permission to Sugarcrm CE 6.2.X . Out of the box you have, VIEW/LIST/ACCESS/IMPORT/EXPORT/DELETE and I wanted to manage a new Optionn called "Massupdate" and other stuff, so I added a new Action called massupdate and now I can manage it from the "Roles" section.
This is how I did it:
- Define de new action in modules/ACLActions/actiondefs.php
- Repair Roles
- Use it in your code
- set language
1) modules/ACLActions/actiondefs.php
Code:
'massupdate'=>
array(
'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
'label'=>'LBL_ACTION_MASSUPDATE',
'default'=>ACL_ALLOW_ALL,
),
2) Repair Roles
3) Use in the code
Code:
if (ACLController::checkAccess('Opportunities', 'massupdate')) {
//your magic here :)
} You can use this type of permission verification for:
- Enabling/Disabling mass update option for a defined Role
- Show different views to different roles - overloading the view.list.php
- ...etc.etc.etc
4) you shall now 
Hope it helps someone else out there!
Bookmarks