Skip to content

Share2 link - #21761

Merged
DeepDiver1975 merged 9 commits into
masterfrom
share2_link
Jan 21, 2016
Merged

DeepDiver1975 merged 9 commits into
masterfrom
share2_link

Conversation

@rullzer

@rullzer rullzer commented Jan 16, 2016

Copy link
Copy Markdown
Contributor

Requires #21755

Move the sharecontroller that handles authentication/displaying/downloading of link shares over to the sharemanager instead of the old code paths.

It is actually pretty straight forward.

CC: @schiesbn @DeepDiver1975 @nickvergessen @PVince81 @LukasReschke

@rullzer rullzer added this to the 9.0-current milestone Jan 16, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @LukasReschke, @nickvergessen and @schiesbn to be potential reviewers

@nickvergessen

Copy link
Copy Markdown
Contributor

We have smashbox tests for downloading a share link and selections from a share link, so I will smash this on monday

@rullzer

rullzer commented Jan 16, 2016

Copy link
Copy Markdown
Contributor Author

Awesome, thanks!

@nickvergessen

Copy link
Copy Markdown
Contributor

Smashbox: ✅

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • BUG: sharing a folder and open it in a private browser tab (so no user session active): getting a white page and:
{"reqId":"k95+X4toHuAx8EZK6g4F","remoteAddr":"::1","app":"PHP","message":"Call to a member function free_space() on null at \/Users\/morrisjobke\/Projects\/owncloud\/master\/lib\/private\/files\/filesystem.php#746","level":3,"time":"2016-01-18T23:22:01+00:00"}

cough we need integration tests for such essential stuff cough cough

@MorrisJobke

Copy link
Copy Markdown
Contributor

I just logged the backtrace at this point:

{"reqId":"n+jblh1radJVCntuyxwO","remoteAddr":"::1","app":"no app in context","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"\",\"Code\":0,\"Trace\":\"
#0 lib/private/helper.php(517): OC\Files\Filesystem::free_space('/mjob/files/asd')
#1 lib/private/helper.php(505): OC_Helper::freeSpace('/mjob/files/asd')
#2 lib/public/util.php(598): OC_Helper::maxUploadFilesize('/mjob/files/asd', NULL)
#3 apps/files_sharing/lib/controllers/sharecontroller.php(251): OCP\Util::maxUploadFilesize('/mjob/files/asd')
#4 [internal function]: OCA\Files_Sharing\Controllers\ShareController->showShare('bXd4SDtGHcMi7nK', '')
#5 lib/private/appframework/http/dispatcher.php(159): call_user_func_array(Array, Array)
#6 lib/private/appframework/http/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_Sharing\Controllers\ShareController), 'showShare')
#7 lib/private/appframework/app.php(110): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_Sharing\Controllers\ShareController), 'showShare')
#8 lib/public/appframework/app.php(134): OC\AppFramework\App::main('ShareController', 'showShare', Object(OC\AppFramework\DependencyInjection\DIContainer))
#9 core/routes.php(112): OCP\AppFramework\App->dispatch('ShareController', 'showShare')
#10 [internal function]: OC\Route\Router->{closure}(Array)
#11 lib/private/route/router.php(273): call_user_func(Object(Closure), Array)
#12 lib/base.php(864): OC\Route\Router->match('/s/bXd4SDtGHcMi...')
#13 index.php(39): OC::handleRequest()
#14 {main}
\",\"File\":\"lib/private/files/filesystem.php\",\"Line\":746}","level":3,"time":"2016-01-18T23:25:49+00:00"}
{"reqId":"n+jblh1radJVCntuyxwO","remoteAddr":"::1","app":"PHP","message":"Call to a member function free_space() on null at \/Users\/morrisjobke\/Projects\/owncloud\/master\/lib\/private\/files\/filesystem.php#747","level":3,"time":"2016-01-18T23:25:49+00:00"}

(the same link works on master just fine)

@rullzer

rullzer commented Jan 19, 2016

Copy link
Copy Markdown
Contributor Author

@MorrisJobke mmm I tought I checked that case... But thansk for testing... will fix!

@rullzer

rullzer commented Jan 19, 2016

Copy link
Copy Markdown
Contributor Author

@MorrisJobke please have another look

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tested and works 👍

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.

any reason why you do this, instead of just using the calls in the code above?

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.

@rullzer This is usually used for the automatic dependency injection by TypeHint or variable 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.

It is the way the unit tests of this class are structured. They create a new application. And this is how the dependencies are injected there instead of useing the onces from $server

@rullzer

rullzer commented Jan 20, 2016

Copy link
Copy Markdown
Contributor Author

Ok cleaned up a bit.
@nickvergessen @MorrisJobke please have another look.

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.

we know the object, should be "'files', $fileId"

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.

applies to all three places

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.

Ah mm right... I just copied to old one :P Lets fix that indeed :P

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.

fixed

@rullzer
rullzer force-pushed the share2_link branch 2 times, most recently from 1df9e1a to db7fa20 Compare January 20, 2016 11:33
@nickvergessen

Copy link
Copy Markdown
Contributor
  • Sharing still works
  • Password shares still work
  • Downloading works
  • Download via explicit download buttons triggers activity

👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tested and works 👍

DeepDiver1975 added a commit that referenced this pull request Jan 21, 2016
@DeepDiver1975
DeepDiver1975 merged commit e2f231d into master Jan 21, 2016
@DeepDiver1975
DeepDiver1975 deleted the share2_link branch January 21, 2016 14:43
@rullzer rullzer mentioned this pull request Jan 25, 2016
35 of 43 tasks
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 8, 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.

5 participants