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] Remove redundant call to build permissions #16862

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Per the comments I added to the function the output of this permissions clause is overwritten. I stepped through
this in the process of reviewing the datepicker PR & confirmed it

Before

Override postProcess function calls $this->buildACLClause($this->_aliases['civicrm_contact']); but I have confirmed the results of that are overwritten

After

Poof

Technical Details

@seamuslee001 @monishdeb @yashodha @MegaphoneJon - I think we have suspected these fn calls were obsolete for a while but I can now confirm that any form that calls buildACLClause and then calls parent::postProcess will have the output of buildACLClause ovewritten

parent::postProcess calls
$sql = $this->buildQuery(); which calls
$this->buildPermissionClause();
which does

    // Override output from buildACLClause
    $this->_aclFrom = NULL;
    $this->_aclWhere = implode(' AND ', $ret);

Comments

Per the comments I added to the function the output of this permissions clause is overwritten. I stepped through
this in the process of reviewing the datepicker PR & confirmed it
@civibot
Copy link

civibot bot commented Mar 20, 2020

(Standard links)

@civibot civibot bot added the master label Mar 20, 2020
@monishdeb
Copy link
Member

I simply agree because of this backtrace

parent::postProcess calls
$sql = $this->buildQuery(); which calls
$this->buildPermissionClause();

which overrides the $this->buildACLClause($this->_aliases['civicrm_contact']);
call in postprocess so why should we have this line in postprocess in first place, oops then why should we override postprocess, yeah lets remove it and put merge on pass on this PR.

Which I did :)

@eileenmcnaughton
Copy link
Contributor Author

@monishdeb lol - yeah I've suspected for a while those can go but this is the first time I've confirmed it

@seamuslee001 seamuslee001 merged commit 4fefe75 into civicrm:master Mar 20, 2020
@seamuslee001 seamuslee001 deleted the build branch March 20, 2020 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants