salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.53k stars 2.1k forks source link

CampaignLog doesn't implement ACL interface #7125

Open Jorilx opened 5 years ago

Jorilx commented 5 years ago

The CampaignLog bean doesn't implement the ACL interface, so you cannot set its permissions from the "Roles" module. Is this by design? I've been bitten by this problem because I have a CampaignLog report (inside the Reports module) and while the admin user can use it normally, other users cannot gain access to its detail page, thus rendering the report useless.

I'm thinking of adding this

    public function bean_implements($interface)
    {
        switch ($interface) {
            case 'ACL':return true;
        }
        return false;
    }

to CampaignLog.php and the related actions to the acl_actions table*, is this enough?

SuiteCRM 7.10.12

*: by going to index.php?module=ACL&action=install_actions

willrennie commented 5 years ago

@Jorilx Please can you construct and detail your issue using the issue template that is provided. Providing the description for your bug, context, steps to reproduce etc. We will then assess your issue further.

Jorilx commented 5 years ago

Yes, sorry, here it is:

Issue

The "Role management" module doesn't show a row for the CampaignLog module, so you cannot set role permissions for it.

Expected Behavior

It should be possible to specify the role permissions for the CampaignLog module.

Actual Behavior

There's no "Campaign log" row inside the role management page.

Possible Fix

Make the CampaignLog bean implement the ACL interface.

Steps to Reproduce

  1. Log in as administrator
  2. Admin -> Role management
  3. Create a role or edit an existing one
  4. There is no way to set permissions for the CampaignLog module

Context

I have an admin-owned report (built with the Reports module) that uses CampaignLog as "base" and while the admin user can use it normally, other users see the report inside the Reports list as unclickable, so they cannot use it at all. This happens because those users have no "CampaignLog" permissions and the Reports module (rightly) prevents them from gaining access to the data. (I need this report because I'd like to be able to export Campaign results to PDF for easier handling)

Your Environment

SuiteCRM 7.10.12 Firefox 66.0.1 MariaDB 10.2.23 PHP 7.0.33 Ubuntu Trusty

willrennie commented 5 years ago

Thanks for that further information. Marking as a bug and setting medium priority. Let me know if you have further comments or feel the priority should be adjusted!

pgorod commented 5 years ago

Link to Forum thread where a couple of people say the proposed fix works:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/22141-campaigns-exporting-printing-status