[Vtigercrm-developers] Role based default module

Vincenzo Bruno v.bruno at vinsoft.it
Thu Apr 30 08:43:22 GMT 2020


Il 30/04/20 09:59, Alan Lord ha scritto:
> This was added recently - it's a per-user setting:
>
> https://code.vtiger.com/vtiger/vtigercrm/issues/89
>
> Al



Interesting, even if it is a 4 years old commit. It should be easily
revised and pulled on the next relase!

Anyway I've developed a very simple solution. I attach the patch

The role's default module must be written directly in the db at the moment.

The form where we have to add the module selection is
index.php?module=Roles&parent=Settings&view=Edit&record=H5

Any suggestion is welcome

Vincenzo




>
> On 30/04/2020 08:37, Vincenzo Bruno wrote:
>> Hi,
>>
>> Vtiger has one default module for all. I need users are sent to
>> different module at login, based on their role. Is already there a way
>> to to that?
>>
>> Even a user preference would be Ok, but I didn't find it.
>>
>> Eventually the solution is quite simple:
>>
>> 1) add a field to the table vtiger_role with the module's name
>>
>> 2) in function process() inside includes/main/WebUI.php check if that
>> field is not empty and override the global default value
>> $defaultModule = vglobal('default_module');
>>
>> What do you think about?
>>
>> Vincenzo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebUI_patch_role_based_default.module.patch
Type: text/x-patch
Size: 1623 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200430/f4bcca16/attachment.bin>


More information about the vtigercrm-developers mailing list