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

Verify if $bean is_subclass_of SugarBean so we can check access #7904



Copy link

Abuelodelanada commented Sep 21, 2019


Read #7903

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

This comment has been minimized.

Copy link

codecov-io commented Sep 21, 2019

Codecov Report

Merging #7904 into hotfix-7.10.x will decrease coverage by <.01%.
The diff coverage is 0%.

@@                Coverage Diff                @@
##           hotfix-7.10.x    #7904      +/-   ##
- Coverage           7.28%    7.28%   -0.01%     
  Files               3700     3700              
  Lines             386188   386189       +1     
- Hits               28132    28131       -1     
- Misses            358056   358058       +2

This comment has been minimized.

Copy link

Mac-Rae commented Sep 25, 2019

Hi @Abuelodelanada,

Me again 🤣, Testing on the current version when you delete a record it is removed from the favourites bar before you are able to click it. Could you explain if I'm missing anything?


This comment has been minimized.

Copy link
Contributor Author

Abuelodelanada commented Sep 25, 2019

Hi @Mac-Rae , so long! 😃

We are trying to get the bean with:

$bean = BeanFactory::getBean($params['module'], $params['record']);

The getBean method returns a SugarBean or a bool if no bean could be retrieved.
This PR only verifies that we have a Bean

if (is_subclass_of($bean, 'SugarBean'))  {

when doing:


Because doing an ACLAcess in a bool produces an error.

To test this:

  1. Go to a DetailView of any record so after that it will be in "Recents".
  2. Delete that record from the database with a real delete (DELETE FROM table WHERE...)
  3. Verify that the 'Pencil' it's not shown in 'Recent'

This comment has been minimized.

Copy link
Contributor Author

Abuelodelanada commented Oct 2, 2019

Hi @Mac-Rae , me again ;-)

Could you read how to test this PR?


This comment has been minimized.

Copy link

cameronblaikie commented Oct 3, 2019

Assessed 👍

@Dillon-Brown Dillon-Brown merged commit 1e8b44f into salesagility:hotfix-7.10.x Oct 3, 2019
4 checks passed
4 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
clahub All contributors have signed the Contributor License Agreement.
codecov/project 7.28% (target 0%)
continuous-integration/travis-ci/pr The Travis CI build passed
@Abuelodelanada Abuelodelanada deleted the gcoop-libre:hotfix-7.10.x-7903 branch Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.