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

[Sharing 2.0] update share #21887

Merged
merged 6 commits into from
Jan 27, 2016
Merged

[Sharing 2.0] update share #21887

merged 6 commits into from
Jan 27, 2016

Conversation

rullzer
Copy link
Contributor

@rullzer rullzer commented Jan 25, 2016

More for #19331

Updating shares is now handled in the sharemanager.
Basically we run the same bunch of tests for updateShare as we do for createShare. And some more.

  • Chaning shareTypes is not allowed
  • Chaning recipient is only allowed for user shares

Please have a look: @DeepDiver1975 @schiesbn @nickvergessen @PVince81

@rullzer rullzer added this to the 9.0-current milestone Jan 25, 2016
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @DeepDiver1975 to be a potential reviewer

@rullzer rullzer mentioned this pull request Jan 25, 2016
43 tasks
if ($publicUpload === 'true') {
$share->setPermissions(\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE);
} else if ($publicUpload === 'false') {
$share->setPermissions(\OCP\Constants::PERMISSION_READ);
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, so "publicUpload" has priority over "permissions", got it.

@PVince81
Copy link
Contributor

Code looks good 👍

@rullzer
Copy link
Contributor Author

rullzer commented Jan 25, 2016

smashbox tests had a timeout...

->set('item_source', $qb->createNamedParameter($share->getPath()->getId()))
->set('file_source', $qb->createNamedParameter($share->getPath()->getId()))
->set('token', $qb->createNamedParameter($share->getToken()))
->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), 'datetime'))
Copy link
Member

Choose a reason for hiding this comment

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

IQueryBuilder::PARAM_DATE instead of 'datetime'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah was not there when this code was writen... but will fix :)

@DeepDiver1975
Copy link
Member

besides my notes 👍

@rullzer
Copy link
Contributor Author

rullzer commented Jan 26, 2016

Rebased and comments addressed. lets see if CI still thinks everything is fine.

if ($fileTarget) $qb->setValue('file_target', $qb->expr()->literal($fileTarget));
if ($permissions) $qb->setValue('permissions', $qb->expr()->literal($permissions));
if ($token) $qb->setValue('token', $qb->expr()->literal($token));
if ($expiration) $qb->setValue('expiration', $qb->createNamedParameter($expiration, 'datetime'));
Copy link
Contributor

Choose a reason for hiding this comment

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

IQueryBuilder

@rullzer
Copy link
Contributor Author

rullzer commented Jan 26, 2016

@nickvergessen could you smash this? Just to be sure.

@PVince81
Copy link
Contributor

Smashbox tests passed for me locally.

@rullzer
Copy link
Contributor Author

rullzer commented Jan 26, 2016

Awesome thanks... then this is good to go!

DeepDiver1975 added a commit that referenced this pull request Jan 27, 2016
@DeepDiver1975 DeepDiver1975 merged commit 5b7a1b1 into master Jan 27, 2016
@DeepDiver1975 DeepDiver1975 deleted the share2_updateShare branch January 27, 2016 08:36
@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