Skip to content

Implement CRM_Core_Permission::check('access CiviContribute')) #103

@deputt

Description

@deputt

Please enable limited access to SumFields for certain users e.g. only those who can access CiviContribute.

I did it (not sure if proper or otherwise) by adding the following lines to net.ourpowerbase.sumfields/CRM/Sumfields/Form/SumFields.php just below function buildQuickForm() at line 8:

if (!CRM_Core_Permission::check('access CiviContribute')){
  // This means the user is not allowed to access CiviContribute
  CRM_Core_Session::setStatus(E::ts("Summary Fields is disabled for your account."));
  return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions