Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Fold getACLs back into the calling function #19872

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Mar 23, 2021

Overview

[REF] Fold getACLs back into the calling function

Before

Complex code flow

After

Suddenly it's obvious the plot twist that is iminent on getACLRoles....

Technical Details

Not called in the civi universe outside of core (it's protected anyway)

Comments

Not called in the civi universe
@civibot
Copy link

civibot bot commented Mar 23, 2021

(Standard links)

$result += self::getACLs((int) $contact_id);
$query = " SELECT acl.*
FROM civicrm_acl acl
WHERE acl.entity_table = 'civicrm_contact'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this even work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 in terms of 'when would entity_table be equal to 'civicrm_contact'? - my suspicion is that it has not been possible for a decade - I'm still trying to test that theory

@eileenmcnaughton
Copy link
Contributor Author

test this please

@eileenmcnaughton
Copy link
Contributor Author

unrelated fail but re-running

api_v3_SyntaxConformanceTest::testCreateSingleValueAlter with data set #82 ('UFField')
Failure in api call for UFField create: Undefined index: type
#0 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/CRM/Utils/Date.php(1953): PHPUnit\Util\ErrorHandler::handleError(8, 'Undefined index...', '/home/jenkins/b...', 1953, Array)
#1 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php(510): CRM_Utils_Date::addDateMetadataToField(Array, Array)
#2 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php(346): CRM_Core_BAO_UFGroup::formatUFField(Object(CRM_Core_DAO), Object(CRM_Core_DAO), Array, Array, Array, 4)
#3 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php(2910): CRM_Core_BAO_UFGroup::getFields(118, false, NULL, NULL, NULL, true, NULL, true)
#4 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/CRM/Core/BAO/UFField.php(107): CRM_Core_BAO_UFGroup::calculateGroupType('118', true)
#5 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/api/v3/utils.php(1298): CRM_Core_BAO_UFField::create(Array, Array)
#6 /home/jenkins/bknix-dfl/build/core-19872-8p1uw/web/sites/all/modules/civicrm/api/v3/UFField.php(30): _civicrm_api3_basic_create('CRM_Core_BAO_UF...', Array, 'UFField')

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 this has passed now - it just moves code around (the questions it raises around the 'civicrm_contact' in entity_value I hope to get to

@seamuslee001 seamuslee001 merged commit 9617185 into civicrm:master Mar 23, 2021
@seamuslee001 seamuslee001 deleted the acl_role branch March 23, 2021 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants