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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/legacy/include/SugarFolders/SugarFolders.php
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.

Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,8 @@ public function retrieveFoldersForProcessing($user, $subscribed = true)
continue;
}

$isGroup = $item->isgroup ?? '';
if ($isGroup === 1) {
$isGroup = $item['is_group'] ?? '';
if ($isGroup == 1) {
$secureReturn[] = $item;
}

Expand Down