Prevent users from creating related records for specified modules

We have a scenario where users need access to, for example, the Notes module. However we want to limit their ability to create notes linked to certain related modules. For example, we permit them to create a note related to the Cases Module but not to the Accounts Module.

I do not believe this is possible with standard security tools in Sugar.

We are  using Sugar on Demand 8.3 and shortly upgrading to 9.0.

Parents
  • It is pretty easy to accomplish.

    We built a field template which extends sticky-rowaction (Create Button). This extended field let you specify a sugarLogic formula which determines whether the button should be active or not. The code bellow could be set in the panel-top of Notes subpanel under restricted modules.

    'buttons' => array(
       array(
       'type' => 'sticky-rowaction-deactivable',
          'icon' => 'fa-plus',
          'name' => 'create_button',
          'label' => ' ',
          'acl_action' => 'create',
          'tooltip' => 'LBL_CREATE_BUTTON_LABEL',
          'deactivable' => array(
             'triggerFields' => array('status'),
             'trigger' => 'or(isInList($status, createList("Closed", "Cancelado", "Pedido nao Postado")),          not(isUserInList(createList("SIMM_GER", "SIMM_SUP"))))',
          )
       ),
    ),

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Andre,

    Thanks for the quick reply.

    The only complication I can see is that we need this to be Role Based so that not all users are restricted only those belonging to certain roles.

    Regards

    Greg

Reply Children