* @return bool
*/
public static function entityRefCreateLinks() {
- return CRM_Core_Permission::check([['edit all contacts', 'add contacts']]);
+ return CRM_Core_Permission::check([['profile create', 'profile listings and forms']]);
}
}
* @return array
*/
public static function getCreateLinks($profiles = '', $appendProfiles = array()) {
+ if (!CRM_Contact_BAO_Contact::entityRefCreateLinks()) {
+ return [];
+ }
// Default to contact profiles
if (!$profiles) {
$profiles = array('new_individual', 'new_organization', 'new_household');