-
Notifications
You must be signed in to change notification settings - Fork 2.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
Allow setting expire on user / group shares via API #15459
Conversation
If a user has a share entry due to the name collision on a group share, it seems to be not correctly updated here |
@nickvergessen can you give an examples which method / parameter configuration? or just add a unit test that demonstrates the wrong update. |
Well @butonic shouldn't you add unit tests to prove it works when trying to introduce a new fancy functionality 😜 This also cries for new additions to the test plans of QA |
cc @rullzer |
@schiesbn @MTRichards We need your input on the correct behavior here. Do we want to have expiration of internal shares? And if yes is it ok to have it only via the API. And if yes. Is this a long term maintainable code path if it doesn´t exist in the GUI? |
This was already requested here: #11642 |
As discussed in the past, yes - I would like it. It is not super urgent, but a nice to have - and since we removed it in a past oC version, I do want it back. As we focus on financial services, this is more important than it was.
I am not super happy about only via the API, since this is not really useful to the end user. Only this use case can work with the API directly, everyone else would want / need the GUI. This might be a step 1 to get to the GUI again using the API, then OK.
Not really, nor is it all that useful outside of this customer. See above. |
@PVince81 @schiesbn aren't we planning on using the same API for web / ajax requests? |
@butonic yes we are! Basically the ajax endpoints have to die as they lead to code duplication and they even use different arguments and such. So once we have it in the API we can also implement it in the new shiny sharing dialog. Having said that it is still a long way to go for the new sharing dialog. I'll have a look at the code later. |
I would suggest to move this to 8.2 as it might have implications we can't think of before the feature freeze. And only exposing it in the API might not be the best UX. |
One of the difficult parts is the cram this all in the existing share dropdown. |
Setting to develop, because this needs tests prior to merge |
Back-end support is easy. The tough question is how to expose the feature to the user in the share dialog. Because we would need a date-picker for every share. I would suggest to address this issue with 8.2, maybe with a re-design of the share dialog as suggested by @PVince81 |
2b041b1
to
f144f68
Compare
A new inspection was created. |
@butonic Is this ready for review? If not: What needs to be done? If you aren't able to fix this, maybe add a checklist so somebody can take over this. |
@butonic are expiration dates supposed to be inherited when resharing ? Because it seems this never worked due to this bug: #11396 (comment) |
Also, setting the date is not enough. You'd also need to fix the expiration logic to kick in for user shares too, see https://github.com/owncloud/core/blob/master/lib/private/share/share.php#L1329 |
and if you enable this, then there will be another bug (#11396 (comment)) that will expire the wrong shares, because "share.js" already sends expirationDate for user shares when it's not supposed to. Quite a mess 😦 |
Interesting. I think they should, but probably not by adding the expire date to the reshare in any form. if the parent share expires the reshare should no longer work. but it should be possible tho create a reshare with a shorter expiration period, eg share e folder 'Project X' to a group with expire date set to in 4 month. A member of that group creates the subfolder 'Project X/Task Y' and creates a public link with expire date set to in 45 days. |
so basically before this can be made to work we need to:
|
I think this should rather wait for the sharing code revamp that is planned for 9.0, see #13014. Then at this time if we want to support user share expiration, even if there is no UI for it, it should get scheduled/planned/designed too @cmonteroluque Also there is a chance that the re-share behavior is changed in #9058 which might obsolete what was mentionned above. |
@PVince81 ok, thanks |
@MorrisJobke we are first porting as much existing behaviour as we can before we introduce new stuff. But once that is done this should not be to hard. |
@rullzer something to add to the next steps ? I'm surprised this didn't conflict with the many changes done to the share code. |
@PVince81 yes worth to think about! Should be relatively easy now... There is no conflict because it is all in the old code ;) |
This PR is agains an outdated code base. Let's consider this again once we redo the sharing dialog. |
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. |
We have users that have been using the API since OC5 to set expire dates on user shares. This PR restores that functionality. no change is made in the web ui. That is tracked in #11642