Skip to content

Instantly share code, notes, and snippets.

@eggsurplus
Created September 25, 2013 16:21
Show Gist options
  • Save eggsurplus/6702133 to your computer and use it in GitHub Desktop.
Save eggsurplus/6702133 to your computer and use it in GitHub Desktop.
Support all editions of SugarCRM while working with team security
<?php
$dictionary['my_Module'] = array(
'table'=>'my_module',
'audited'=>false,
'fields'=>array (
//....removed for gist
),
);
//check to see which edition we are installed on and enable/disable team_security as appropriate
global $sugar_flavor;
if(!empty($sugar_flavor) && $sugar_flavor=='CE'){
VardefManager::createVardef('my_Module','my_Module', array('basic','assignable'));
} else {
VardefManager::createVardef('my_Module','my_Module', array('basic','team_security','assignable'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment