-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: update re-share if shared-by user has been revoked #43025
base: master
Are you sure you want to change the base?
fix: update re-share if shared-by user has been revoked #43025
Conversation
Another effected case by this issue:
|
c298bf1
to
0828727
Compare
@artonge I've updated as you requested, please check again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments to clarify what each if
group does?
I am also wondering if we could find this shares with the following query:
SELECT
f.fileid,
f.path,
f.storage,
s.id as share_id,
s.uid_owner as share_owner,
s.uid_initiator as share_initiator,
s.share_with as share_recipient
FROM
oc_filecache f
JOIN oc_share s ON f.fileid = s.file_source
AND s.uid_initiator NOT IN (
SELECT
user_id
FROM
oc_mounts m
WHERE
f.storage = m.storage_id
)
If so, then we could have a background job to remove them every hour or so like https://github.com/nextcloud/server/blob/master/apps/files_sharing/lib/DeleteOrphanedSharesJob.php, which might be easier than the current solution.
@artonge It only works if the shared-by user refreshes his files list after his share has revoked. So, I don't think this query would do the job. |
007d650
to
df7160f
Compare
df7160f
to
73fb85b
Compare
7e64905
to
cf9b02a
Compare
|
UserC already loses access to Folder1 after step 3, right? |
No, UserC didn't lose access to Folder1 after step3. This is the issue we are trying to fix.
No error. |
@come-nc Reproduce steps: Solution: |
a03da0a
to
e1450ee
Compare
e1450ee
to
522cf26
Compare
522cf26
to
b23eafb
Compare
b23eafb
to
5b01338
Compare
5b01338
to
cc6c3dc
Compare
…erring Signed-off-by: Luka Trovic <[email protected]>
cc6c3dc
to
bff24d1
Compare
Summary
Add command
occ sharing:fix-broken-shares
to fix the shares that were broken on transfer ownership.Checklist