Skip to content

Only show link shares for the current user - #22285

Merged
DeepDiver1975 merged 2 commits into
masterfrom
fix_22275
Feb 10, 2016
Merged

DeepDiver1975 merged 2 commits into
masterfrom
fix_22275

Conversation

@rullzer

@rullzer rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor

Currently we have no way to display multiple links in the UI.
So just display the link share for the current user.

Fixes #22275

CC: @nickvergessen @PVince81 @schiesbn @MorrisJobke

Currently we have no way to display multiple links in the UI.
So just display the link share for the current user.

Fixes #22275
@PVince81

Copy link
Copy Markdown
Contributor

👍 makes sense

Note: the web UI was never intended to display more than one link share. Maybe it will change one day

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Note: the web UI was never intended to display more than one link share. Maybe it will change one day

Yeah I know. We need to think about that.

Even mutliple link shares for 1 user would eventually make sense in my view... since i want to share a link to a user... so I can unshare when I want. But that is a whole other discussion ;)

@MorrisJobke

Copy link
Copy Markdown
Contributor

The described behavior is now in place, but it looks weird, because the symbol in the files table shows the link icon even if the user didn't have a link share (but other users do).

@PVince81

Copy link
Copy Markdown
Contributor

The link icon come from the summarized response from ajax.php (loadIcon), is the new API returning link shares there ? Make sure it's filitered to the current user. (for now)

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

aaah warg... stupid ajax.... Let me see if that is fixable...

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Ok fixed. I'm not really happy with this all... but I think for now it is the best we can do...

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

aaah mmm... this does mean that is a file is unshared from a user we should remove all their link shares...

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Will add

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Aaah mm no... that won't scale properly... since if user1 shares a file with a group with 1000 users we have to check for each of those users if have to remove the share.

Mmmm let me think about this...

Comment thread lib/private/share/share.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missing ` around the column name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks. fixed...

Make sure we do not show an icon if we can't display a share
@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Issue of the invisible links raised in #22295

Lets get this in.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Now the overview never shows the chain icon and only updates the chain icon (in the folder thumbnail and the inline text) when the sidebar is opened and the shares are loaded.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Before opening the sidebar:
bildschirmfoto 2016-02-10 um 17 23 13

Clicking on the share text (which opens the sidebar and loads the shares):
bildschirmfoto 2016-02-10 um 17 23 22

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

@MorrisJobke mmm strange all works here...

@PVince81

Copy link
Copy Markdown
Contributor

Followed the steps from #22275, works so far.

But regarding the indicator: refresh the page as user1, the indicator shows a link share, which is correct.
However do the same for user2, the indicator shows regular share, not link share.

@rullzer maybe you mixed up users when testing ?

@PVince81

Copy link
Copy Markdown
Contributor

Actually the indicator isn't even for outgoing share, it's from the incoming share.

The getItemStatuses call returns an empty set.

@PVince81

Copy link
Copy Markdown
Contributor

Regarding the original issue, I also tested resharing a subdir: user1 shared "test" with user2, user2 shares "test/sub" with link, then user1 shares "test/sub" with link too. It works correctly, every user sees the correct link share.

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Yes I see this now as well. It is due to the new reshare behaviour. If you check on master there is also no link icon..

@rullzer

rullzer commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

Ok lets move forward with this PR. The issue Morris found was actually a differnt issue that is also present on current master. It is a result of using the old ajax endpoint for the share info. I'll raise a separate ticket for this.

This does fix the issue it was ment to fix.

@PVince81

Copy link
Copy Markdown
Contributor

I agree with @rullzer, the issue of seeing the wrong link share is much more critical than the missing indicator.

👍

@MorrisJobke do you agree ?

@LukasReschke

Copy link
Copy Markdown
Contributor

Seems to work. Code looks as good as code in share.php can look 😉 👍

DeepDiver1975 added a commit that referenced this pull request Feb 10, 2016
Only show link shares for the current user
@DeepDiver1975
DeepDiver1975 merged commit 3184115 into master Feb 10, 2016
@DeepDiver1975
DeepDiver1975 deleted the fix_22275 branch February 10, 2016 19:01
@lock

lock Bot commented Aug 7, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link shares are not unique per user in the web UI

6 participants