Skip to content

Instantly share code, notes, and snippets.

@esimonetti
Created March 5, 2014 08:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esimonetti/9363635 to your computer and use it in GitHub Desktop.
Save esimonetti/9363635 to your computer and use it in GitHub Desktop.
Remove Team Security filtering in SugarCRM 7 - (location: custom/data/visibility/TeamSecurity.php and remember to run a quick repair!) - Code for blog post http://enricosimonetti.com/can-i-remove-team-security-from-sugarcrm/
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class TeamSecurity extends SugarVisibility
{
public function addVisibilityFrom(&$query)
{
return $query;
}
public function addVisibilityFromQuery(SugarQuery $query, $options = array())
{
return $query;
}
}
@visaolive
Copy link

Checked your solution out. This is good in some cases. But I have another scenario. Throughout SugarCRM, we're able to see that Teams security will limit record visibility. However, if we were to choose or add a new Team to any record, we see all available Teams in Sugar, as opposed to just the Teams the user is a part of. Would we be able to use this override to further enforce Team Visibility at the popup level, and only display Teams this user is a part of, and no more? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment