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

groupfolder activities on move/rename #1163

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented May 10, 2023

retrieve the list of affectedUsers related to groupfolders, including ACL checks.

On file moving, it does the handling the same way a file is moved from a shared folder to another.
Meaning that if a user gain or loose read rights during the moving process the file is said as new or deleted

This is from the point of view of a user with no ACL limitation:
Selection_065

And this is from the point of view of a user that have not access to the folder a file is moved to/from:
Selection_066

@artonge
Copy link
Collaborator

artonge commented May 12, 2023

/rebase

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
// file can be shared using GroupFolders, including ACL check
if ($this->config->getSystemValueBool('activity_use_cached_mountpoints', false)) {
$this->userMountCache->clear(); // clear cache for new data
$affectedUsers = array_merge($affectedUsers, $this->getAffectedUsersFromCachedMounts($fileId));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why merge? Isn't getAffectedUsersFromCachedMounts supposed to return an updated list?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question for other changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

the list is cached by UserMountCache. because we are moving files, we only get old data from pre-move; clearing the cache allows to get fresh data post-move

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I get it, the list is different pre- and post-move as the impacted user are of course different. Thanks :)

@ArtificialOwl ArtificialOwl merged commit d7f95d8 into master Jun 6, 2023
@delete-merged-branch delete-merged-branch bot deleted the enh/noid/gf-activity-on-move branch June 6, 2023 15:08
@ArtificialOwl
Copy link
Member Author

/backport to stable27

@ArtificialOwl
Copy link
Member Author

/backport to stable26

@ArtificialOwl
Copy link
Member Author

/backport to stable25

@ArtificialOwl
Copy link
Member Author

/backport to stable23

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