0

I have create a new action (sync) for one of the sugarCRM modules (Contacts). When I'm logged in, the action is accessible via this link (My localhost):
http://localhost/sugar/index.php?module=Contacts&action=sync But this action is not visible to public (visitors). How to exclude this action from access checks in sugarcrm?

hpaknia
  • 2,223
  • 3
  • 28
  • 52

1 Answers1

2

I am new to Sugar myself but I believe one method would be to add a new entry point. You can do it like this...

Add a new entry point in custom/include/MVC/Controller/entry_point_registry.php

$entry_point_registry['sync'] = array('file' => 'custom/include/contacts-sync.php', 'auth' => false);

Is now accessible at http://localhost/sugar/index.php?entryPoint=sync

I am not sure how to do it in the action itself yet but it is likely possible, perhaps this will help you some though.

Here is some example existing Entry Points in SugarCRM...

  • campaign_tracker.php – used by the Campaign Management module for tracking campaign responses. Deprecated as of Sugar 5.1.0.
  • cron.php – used by the Windows Scheduler Service or the cron service on Linux and Unix for executing the Sugar Scheduler periodically.
  • index.php – default entry point into the Sugar application install.php – used for initial install
  • maintenance.php – invoked when the application is down for maintenance. metagen.php – Deprecated as of Sugar 5.1.0.
  • silentUpgrade.php – used for silent installer
  • soap.php – entry point for all SOAP calls
  • vcal_server.php – used for syncing information to Outlook

So I think this is the right fit for your sync file.

JasonDavis
  • 45,100
  • 92
  • 294
  • 508
  • As of 6.3.x, entry points are created using the extension framework. The entry point extension directory is located at ./custom/Extension/application/Ext/EntryPointRegistry/. Entry point files found is this directory will be compiled into ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php after a Quick Repair and Rebuild. The old method of creating entry points is still compatible but is not recommended from a best practices standpoint. Another note: SuiteCRM is functionally the same as SugarCRM when it comes to this particular part (and many others.) – GeorgeWL Feb 08 '17 at 11:20