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

Update SugarFolders.php Not returning User Accessible inbound accounts (group) #276

Closed
wants to merge 1 commit into from

Conversation

pstevens71
Copy link

@pstevens71 pstevens71 commented Jun 2, 2023

Just troubleshooting group folders. and found this.

2 small bugs:

Description

  1. $item->isgroup is not correct. It is not a class but and array and should be retrieved like $item['is_group'] also the name isgroup is incorrect, it should be is_group like in the array.

  2. if($isGroup===1) is too restrictive. Should be if ($isGroup == 1) which will return true. (this was an issue in 7.12 too!)

Since Group folders are not working anyway (I'm working on that too! the problem is the JSON returns group folders in a separate array for the folders selections in user profile list, I haven't tested potential impacts of changing this)

Motivation and Context

Trying to get group folders working and usable for users. Currently cannot see or view group folders.

How To Test This

Types of changes

  • [ x] 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.

…s. is_group

2 small bugs: 1) $item->isgroup is not correct.  It is not a class but and array and should be retrieved like $item['is_group'] also the name isgroup is incorrect, it should be is_group like in the array.

2) if($isGroup===1) is too restrictive.  Should be if ($isGroup == 1) which will return true.
@SuiteBot
Copy link

SuiteBot commented Jun 2, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Author

Choose a reason for hiding this comment

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

This change is no longer necessary, I have incorporated this in a revised retrieveFoldersForProcessing function that includes this fix along with functionality to check if current user is admin and also to filter out group folders that the current user does not have access to. Currently, all group folders show.

Copy link
Contributor

@clemente-raposo clemente-raposo Jun 7, 2023

Choose a reason for hiding this comment

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

Hi @pstevens71, thank you for the PR and for the update.

I didn't follow 100%.

Does this mean we can close this PR?

Copy link
Author

Choose a reason for hiding this comment

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

Yes you can close this one. I'm going to enter another one today that includes this change plus a few other things in this particular function to support getting group folders to work properly. I have a whole bunch of changes that together solve the whole problem. Apologies I'm kind of new to Github and don't know how to delete or modify this PR. After I entered it I realized a bunch of other modifications where necessary in addition to this.

@clemente-raposo
Copy link
Contributor

@pstevens71 thank you.

closing according to #276 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants