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

[stable10] View-only dav plugin using IShare attributes #34951

Merged
merged 3 commits into from
Apr 5, 2019

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Apr 2, 2019

Backport of #33994 to stable10

There were minor conflicts in unit test files.

@PVince81 PVince81 added this to the development milestone Apr 2, 2019
@PVince81 PVince81 self-assigned this Apr 2, 2019
@PVince81 PVince81 changed the title Stable10 View-only dav plugin using IShare attributes [stable10] View-only dav plugin using IShare attributes Apr 2, 2019
@PVince81
Copy link
Contributor Author

PVince81 commented Apr 2, 2019

huh wat

An unhandled exception has been thrown:
Error: Undefined class constant 'JSON' in /drone/src/core/Migrations/Version20181220085457.php:41
Stack trace:
#0 /drone/src/lib/private/DB/MigrationService.php(411): OC\Migrations\Version20181220085457->changeSchema(Object(Doctrine\DBAL\Schema\Schema), Array)
#1 /drone/src/lib/private/DB/MigrationService.php(366): OC\DB\MigrationService->executeStep(20181220085457)
#2 /drone/src/lib/private/Setup/AbstractDatabase.php(107): OC\DB\MigrationService->migrate()
#3 /drone/src/lib/private/Setup.php(343): OC\Setup\AbstractDatabase->runMigrations()
#4 /drone/src/core/Command/Maintenance/Install.php(86): OC\Setup->install(Array)
#5 /drone/src/lib/composer/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /drone/src/lib/composer/symfony/console/Application.php(960): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /drone/src/lib/composer/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Maintenance\Install), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /drone/src/lib/composer/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /drone/src/lib/private/Console/Application.php(161): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /drone/src/console.php(106): OC\Console\Application->run()
#11 /drone/src/occ(11): require_once('/drone/src/cons...')
#12 {main}

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 2, 2019

could it be that on stable10 the Doctrine version doesn't support JSON yet ?

@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #34951 into stable10 will decrease coverage by 11.19%.
The diff coverage is 41.23%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34951      +/-   ##
==============================================
- Coverage       64.21%   53.01%   -11.2%     
==============================================
  Files            1277       63    -1214     
  Lines           76366     7394   -68972     
  Branches         1292     1307      +15     
==============================================
- Hits            49037     3920   -45117     
+ Misses          26950     3093   -23857     
- Partials          379      381       +2
Flag Coverage Δ Complexity Δ
#javascript 53.01% <41.23%> (-0.2%) 0 <0> (ø)
#phpunit ? ?
Impacted Files Coverage Δ Complexity Δ
core/js/shareitemmodel.js 67.76% <35.89%> (-9.69%) 0 <0> (ø)
core/js/sharedialogshareelistview.js 76.22% <63.15%> (-2.62%) 0 <0> (ø)
apps/updatenotification/templates/admin.php
lib/private/Encryption/Keys/Storage.php
lib/private/App/CodeChecker/NodeVisitor.php
lib/private/RedisFactory.php
apps/dav/lib/Avatars/AvatarNode.php
...s/dav/appinfo/Migrations/Version20170202213905.php
apps/dav/lib/Upload/ChunkLocationProvider.php
apps/files/lib/AppInfo/Application.php
... and 1193 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 245096b...6f025db. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #34951 into stable10 will increase coverage by 0.03%.
The diff coverage is 71.82%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34951      +/-   ##
==============================================
+ Coverage       64.21%   64.25%   +0.03%     
- Complexity      19910    19994      +84     
==============================================
  Files            1277     1281       +4     
  Lines           76371    76671     +300     
  Branches         1292     1307      +15     
==============================================
+ Hits            49044    49267     +223     
- Misses          26948    27023      +75     
- Partials          379      381       +2
Flag Coverage Δ Complexity Δ
#javascript 53.01% <41.23%> (-0.2%) 0 <0> (ø)
#phpunit 65.45% <84.95%> (+0.07%) 19994 <69> (+84) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/AppInfo/Application.php 50.48% <0%> (-0.5%) 17 <0> (ø)
apps/files/download.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/Files/Meta/MetaFileVersionNode.php 89.83% <0%> (-6.54%) 29 <2> (+2)
lib/private/legacy/files.php 0% <0%> (ø) 68 <0> (+3) ⬆️
lib/private/Files/Meta/MetaVersionCollection.php 87.5% <0%> (ø) 16 <0> (ø) ⬇️
core/Migrations/Version20181220085457.php 0% <0%> (ø) 2 <2> (?)
lib/private/Share20/DefaultShareProvider.php 98.42% <100%> (+0.09%) 121 <7> (+7) ⬆️
apps/files_sharing/lib/MountProvider.php 95.83% <100%> (+0.44%) 25 <0> (+3) ⬆️
apps/dav/lib/Connector/Sabre/ServerFactory.php 95.89% <100%> (+0.11%) 10 <0> (ø) ⬇️
apps/files_sharing/lib/Hooks.php 100% <100%> (ø) 34 <12> (+19) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9643888...d990934. Read the comment docs.

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 4, 2019

I did some research and we can't upgrade doctrine/dbal to 2.6 because it would require PHP 7.1 and we're currently still on PHP 7.0.

So the only solution for now is using a text column. Pushed as the latest commit.

I've adjusted master as well here: #34965

Added additional share attributes for shares as an extension point for
apps to provide their own extra attributes that can be used as
extra permissions.
@PVince81 PVince81 force-pushed the stable10-secure_view_plugin branch from 6f025db to bc03e3f Compare April 4, 2019 13:25
@PVince81
Copy link
Contributor Author

PVince81 commented Apr 4, 2019

fixed test issue that sneaked in during conflict resolution.
squashed and rebased onto stable10

mrow4a and others added 2 commits April 4, 2019 16:41
Added share attribute "download" that can be used to allow/restrict
downloading of shared files or folders.
doctrine/dbal 2.5 doesn't have json, so using text instead for now
@PVince81 PVince81 force-pushed the stable10-secure_view_plugin branch from bc03e3f to d990934 Compare April 4, 2019 14:42
@PVince81
Copy link
Contributor Author

PVince81 commented Apr 4, 2019

now had to fix php 7.1 syntax to be 7.0 compatible: replaced [$a, $b] = ... with list($a, $b) = ...

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 4, 2019

and now the "git fetch remote timeout" issue. restarted

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 5, 2019

@DeepDiver1975 CI green, review ?

@PVince81 PVince81 merged commit d5ed97c into stable10 Apr 5, 2019
@delete-merged-branch delete-merged-branch bot deleted the stable10-secure_view_plugin branch April 5, 2019 09:12
@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
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.

3 participants