Commit Graph

11939 Commits

Author SHA1 Message Date
Joas Schilling 0b831a2bed
Move EntityEvent to PSR-4 2016-05-23 09:06:02 +02:00
Joas Schilling c9fda84841
Make the root collection neutral so it does not only work for files 2016-05-23 09:03:48 +02:00
Jenkins for ownCloud 357d342467 [tx-robot] updated from transifex 2016-05-23 01:55:10 -04:00
Jenkins for ownCloud 88328000b1 [tx-robot] updated from transifex 2016-05-22 01:56:56 -04:00
Vincent Petry 7a6966cdfe Merge pull request #24732 from owncloud/autoloader_fix
Autoloader fix
2016-05-21 19:09:22 +02:00
Vincent Petry 8646802850 Merge pull request #24696 from owncloud/lock-jobs-while-executing
Lock jobs while executing them, to allow multiple executors to run in…
2016-05-21 19:08:15 +02:00
Joas Schilling d0a2fa0506
Lock jobs while executing them, to allow multiple executors to run in parallel 2016-05-21 01:59:25 +02:00
Joas Schilling 7e3ce83526
Add a method to lock a table 2016-05-21 01:59:03 +02:00
Björn Schießle 7b25839bd5
use share initiator as fall back to access the file
in case of federated re-shares the owner can be a remote user.
Therefore we can't always use to owner to access the local file
2016-05-20 21:15:15 +02:00
Piotr Filiciak 9999e05660
Http Range requests support in downloads
Http range requests support is required for video preview
2016-05-20 18:16:44 +02:00
Vincent Petry 8fbb63d316
Some tweaks for systemtagmanager 2016-05-20 17:56:02 +02:00
Vincent Petry 88740f035d
Act on effective system tag canAssign permission
Whenever the server returns true for the can-assign Webdav property of
a system tag, it means the current user is allowed to assign,
regardless of the value of user-assignable.

This commit brings the proper logic to the web UI to make it possible
for users to assign when they have the permission.
2016-05-20 17:56:02 +02:00
Vincent Petry b5eb3d9e5a
Add system tag assignability check with groups
Whenever a user is not an admin, a tag is visible but not
user-assignable, check whether the user is a member of the allowed
groups.
2016-05-20 17:56:02 +02:00
Vincent Petry 3cd65fe25d
Add systemtag_group table and get/set methods
Added systemtag to group mapping table.
Added methods in ISystemTagManager to get/set the group mappings.
2016-05-20 17:56:02 +02:00
Vincent Petry 09b3883d9c
Updated canUser* functions in SystemTagManager to accept objects 2016-05-20 17:56:02 +02:00
Vincent Petry 8343cfb64b
Add interface methods for permission check
Instead of checking for admin perm, use interface method
canUserAssignTag and canUserSeeTag to check for permissions.
Allows for more flexible implementation.
2016-05-20 17:56:02 +02:00
Roeland Jago Douma edb512bf4d
Move Template to PSR-4 2016-05-20 16:35:07 +02:00
Roeland Jago Douma c9ad60defc
Only allow loading of legacy (lib/private/legacy) by default 2016-05-20 16:35:07 +02:00
Roeland Jago Douma 802be173da
\OCP is handled by composer autoloader 2016-05-20 16:35:07 +02:00
Joas Schilling 94ad54ec9b Move tests/ to PSR-4 (#24731)
* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
2016-05-20 15:38:20 +02:00
Christoph Wurst 11dc97da43
try token login first 2016-05-20 10:52:39 +02:00
Vincent Petry bac8e13324
Remove unneeded unsets in encoding wrapper 2016-05-20 09:33:59 +02:00
Vincent Petry e8d082208d
Fixes for encoding wrapper
Improved label
Fixed rename/copy/moveFromStorage/copyFromStorage and added tests
Improved findPathToUse algo
2016-05-20 09:33:59 +02:00
Vincent Petry f8b2b95408
Scanner must normalize new children names for cache diff
Since new children from the storage might contain NFD entries, these
must be normalized to NFC to be properly diff'ed with the cache
contents which is always NFC.

This fixes an issue where NFD entries would disappear from the cache
after rescannng for children.
2016-05-20 09:33:59 +02:00
Vincent Petry db4c7fe743
Add encoding wrapper as opt-in mount option
The encoding wrapper is now only applied when the mount option is set,
disabled by default.
2016-05-20 09:33:59 +02:00
Vincent Petry 63bbbf29f4
Add wrapper for NFD encoding workaround 2016-05-20 09:33:59 +02:00
Vincent Petry b495895017 Merge pull request #24728 from owncloud/no-more-test_-files
Fix autoloader for Test* files
2016-05-20 09:29:01 +02:00
Vincent Petry 65eae43ab1 Merge pull request #24721 from owncloud/public_psr4
Move \OCP to PSR-4
2016-05-19 15:53:03 +02:00
Joas Schilling f8180391fd
Create a Fallback in the old autoloader for PSR-4 Test\TestCase 2016-05-19 15:45:34 +02:00
Joas Schilling ffa4633822
No more Test_* files exist, remove autoloading 2016-05-19 15:38:16 +02:00
Vincent Petry f42cdec4c4 Merge pull request #24725 from owncloud/ocs-provider-psr4
Move OCS Provider to PSR-4 namespace
2016-05-19 15:36:19 +02:00
Vincent Petry 0bbf825f6e Merge pull request #24722 from owncloud/notification_psr4
Move \OCP\Notification to PSR-4
2016-05-19 15:35:45 +02:00
Vincent Petry 7d2bc47f81 Merge pull request #24724 from owncloud/mail_psr4
Move \OCP\Mail to PSR-4
2016-05-19 15:35:09 +02:00
Vincent Petry 5ba0554974 Merge pull request #24723 from owncloud/migration_psr4
Move \OCP\Migration to PSR-4
2016-05-19 15:34:22 +02:00
Vincent Petry a4ce528bca Merge pull request #24720 from owncloud/systemtag_psr4
Move \OCP\SystemTag to PSR-4
2016-05-19 15:33:59 +02:00
Vincent Petry 8425133c7d Merge pull request #24719 from owncloud/security_psr4
Move \OCP\Security to PSR-4
2016-05-19 15:33:05 +02:00
Vincent Petry 3b3940df6b Merge pull request #24660 from owncloud/no-token-login-for-disabled-users
don't allow token login for disabled users
2016-05-19 15:32:09 +02:00
Joas Schilling 20f229eed9
Move OCS Provider to PSR-4 namespace 2016-05-19 11:10:32 +02:00
Vincent Petry 6ace14b6ad Merge pull request #24718 from owncloud/route_psr4
Move \OCP\Route to PSR-4
2016-05-19 10:30:32 +02:00
Vincent Petry 78732aaf0c Merge pull request #24717 from owncloud/preview_psr4
Move \OCP\Preview to PSR-4
2016-05-19 10:30:21 +02:00
Vincent Petry ae7e14b223 Merge pull request #24710 from owncloud/lock_psr4
Move \OCP\Lock to PSR-4
2016-05-19 10:28:49 +02:00
Roeland Jago Douma 893204ef4a
Fix broken exception naming 2016-05-19 10:05:53 +02:00
Roeland Jago Douma d666725fa7
Move \OCP to PSR-4 2016-05-19 09:43:33 +02:00
Christoph Wurst f824f3e5f3
don't allow token login for disabled users 2016-05-18 21:10:37 +02:00
Roeland Jago Douma c05032ff20
Move \OCP\SystemTag to PSR-4 2016-05-18 18:30:49 +02:00
Roeland Jago Douma f67f888d50
Move \OCP\Security to PSR-4 2016-05-18 18:28:31 +02:00
Christoph Wurst 0626578739
add method to query all user auth tokens 2016-05-18 18:25:37 +02:00
Roeland Jago Douma 2dc8c3a3f2
Move \OCP\Route to PSR-4 2016-05-18 18:23:44 +02:00
Vincent Petry dc0e3617dc Merge pull request #24707 from owncloud/l10n_psr4
Move \OCP\L10N to PSR-4
2016-05-18 18:23:44 +02:00
Roeland Jago Douma 31f6d01606
Move \OCP\Preview to PSR-4 2016-05-18 18:22:34 +02:00
Roeland Jago Douma bd27eadf9e
Move \OCP\Notification to PSR-4 2016-05-18 18:21:27 +02:00
Roeland Jago Douma 1c721771ff
Move \OCP\Migration to PSR-4 2016-05-18 18:19:24 +02:00
Vincent Petry 01f44d83b2 Merge pull request #24691 from owncloud/fixchunkttl
Allow chunk GC mtime tolerance for unfinished part chunks
2016-05-18 18:19:08 +02:00
Roeland Jago Douma babdf8477d
Move \OCP\Mail to PSR-4 2016-05-18 17:42:33 +02:00
Roeland Jago Douma 12fd87d0a3
Move \OCP\Lock to PSR-4 2016-05-18 17:10:04 +02:00
Vincent Petry 4a94203492 Merge pull request #24706 from owncloud/http_psr4
Move \OCP\Http to PSR-4
2016-05-18 16:50:17 +02:00
Roeland Jago Douma 40bf0a913f
Move \OCP\L10N to PSR-4 2016-05-18 16:38:44 +02:00
Vincent Petry 6231b72e25 Merge pull request #24677 from owncloud/single-token-provider
a single token provider suffices
2016-05-18 16:31:53 +02:00
Roeland Jago Douma 4a53542e45
Move \OCP\Files to PSR-4 2016-05-18 14:35:50 +02:00
Robin Appelman e6386652df Trigger propagation from the background scanner 2016-05-18 14:31:43 +02:00
Vincent Petry e0af5263fb
Allow chunk GC mtime tolerance for unfinished part chunks
Whenever part chunks are written, every fwrite in the write loop will
reset the mtime to the current mtime. Only at the end will the touch()
operation set the mtime to now + ttl, in the future.

However the GC code is expecting that every chunk with mtime < now are
old and must be deleted. This causes the GC to sometimes delete part
chunks in which the write loop is slow.

To fix this, a tolerance value is added in the GC code to allow for
more time before a part chunk gets deleted.
2016-05-18 13:39:37 +02:00
Roeland Jago Douma 1d2c1e60ee
Move \OCP\Http to PSR-4 2016-05-18 09:24:10 +02:00
Christoph Wurst 98b465a8b9
a single token provider suffices 2016-05-18 09:20:48 +02:00
Jenkins for ownCloud 765782445a [tx-robot] updated from transifex 2016-05-18 01:54:53 -04:00
Roeland Douma d5506b605f Move \OCP\Encryption to PSR-4 (#24680) 2016-05-17 23:08:43 +02:00
Robin Appelman de5b7609f9 use mount providers to setup home storages (#24567) 2016-05-17 21:40:55 +02:00
Roeland Douma 7dbdf2f7e0 \OCP\DB to PSR-4 (#24650)
* Move \OCP\DB to PSR-4

* Fix PHP doc
2016-05-17 17:38:25 +02:00
Vincent Petry 379be91618 Merge pull request #24597 from owncloud/run-upgrade-in-incognito-mode
run upgrades in incognito mode
2016-05-17 16:14:11 +02:00
Roeland Douma 5c9103287f Group fixup (#24621)
* Move used OC_Group_xx to \OC\Group

* Add (deprecated) legacy wrapper in legacy, OC_Group_xx

* Replace deprecated use of OC_Group_xx with \OC\Group\xx
2016-05-17 16:06:44 +02:00
Roeland Douma 90a290afd8 Move \OCP\Diagnostics to PSR-4 (#24667) 2016-05-17 15:53:49 +02:00
Roeland Douma 499f0e487d Move \OCP\Authentication to PSR-4 (#24632) 2016-05-17 10:29:23 +02:00
Roeland Douma cbff3e0de7 Move \OCP\Console to PSR-4 (#24636) 2016-05-17 10:28:58 +02:00
Roeland Douma 15fdd36617 Move \OCP\Contacts to PSR-4 (#24645) 2016-05-17 10:22:21 +02:00
Jörn Friedrich Dreyer ca8d2e2f2e Merge pull request #24370 from owncloud/iclientservice-dicontainer
add IClientService to DI container
2016-05-17 09:33:54 +02:00
Jörn Friedrich Dreyer 5e03e9a843 Merge pull request #24083 from owncloud/fix-race-condition
Read only once
2016-05-17 09:03:57 +02:00
Jenkins for ownCloud c24a685ab5 [tx-robot] updated from transifex 2016-05-17 01:54:56 -04:00
Jenkins for ownCloud bafa02d312 [tx-robot] updated from transifex 2016-05-16 01:54:58 -04:00
Jenkins for ownCloud 7c28f62e20 [tx-robot] updated from transifex 2016-05-15 01:55:34 -04:00
Vincent Petry e383a9506d Merge pull request #24617 from owncloud/autoloader_no_private
our autoloader should not load classes in \OC
2016-05-13 17:30:10 +02:00
Vincent Petry 3db709d568 Merge pull request #24600 from owncloud/http-client-lazy-config
only configure the http client once we start using it
2016-05-13 16:10:24 +02:00
Vincent Petry 6938904b07 Merge pull request #24614 from owncloud/token-validation-log
don't spam the log file with failed token validation entries
2016-05-13 16:09:49 +02:00
Roeland Jago Douma a037c10c88
All \OC\ classes are handled by the composer autoloader 2016-05-13 11:11:01 +02:00
Roeland Jago Douma 5a5a5b2032
OC_xx all live in the legacy folder 2016-05-13 11:10:21 +02:00
Christoph Wurst ed01305e29
don't spam the log file with failed token validation entries 2016-05-13 09:53:50 +02:00
Roeland Jago Douma 05cc0dd478
Move \OC\Template to PSR-4 2016-05-13 08:54:07 +02:00
Roeland Jago Douma eb79b83831
Move functions.php to legacy
This file should really be properly namespaced etc!
2016-05-13 08:54:07 +02:00
Jenkins for ownCloud cba4875e4d [tx-robot] updated from transifex 2016-05-13 02:08:45 -04:00
Robin Appelman ea0f09a7ed only configure the http client once we start using it 2016-05-12 13:29:45 +02:00
Morris Jobke 9b3eefbf95 Merge pull request #24563 from owncloud/redis-factory
factor out redis configuration into it's own factory
2016-05-12 13:15:12 +02:00
Christoph Wurst 8b6bb0a426 Log user out correctly if max session lifetime is reached (#24552) 2016-05-12 12:09:13 +02:00
Christoph Wurst 3a1882b143
run upgrades in incognito mode 2016-05-12 11:56:58 +02:00
Roeland Douma 56f4c4bed9 Move \OCP\Comments to PSR-4 (#24565) 2016-05-12 09:48:11 +02:00
Roeland Douma 9b05f37fad lib/private/ocs to PSR-4 (#24558)
* Move OC_OCS_XX to legacy

* Move \OC\OCS to PSR-4

* OC_OCS_xx to \OC\OCS\xx

* Moved OC_OCS_xx to proper namespace
* OC_OCS_xx is still there for legacy reasons as a wrapper

* No calls to OC_OCS_xx in \OC\OCS\
2016-05-12 09:43:53 +02:00
Lukas Reschke 52add798d4 Do not automatically try to enable index.php-less URLs (#24539)
The current logic for mod_rewrite relies on the fact that people have properly configured ownCloud, basically it reads from the `overwrite.cli.ur
l` entry and then derives the `RewriteBase` from it.

This usually works. However, since the ownCloud packages seem to install themselves at `/owncloud` (because subfolders are cool or so…) _a lot_ of people have just created a new Virtual Host for it or have simply symlinked the path etc.

This means that `overwrite.cli.url` is wrong, which fails hard if it is used as RewriteBase since Apache does not know where it should serve files from. In the end the ownCloud instance will not be accessible anymore and users will be frustrated. Also some shared hosters like 1&1 (because using shared hosters is so awesome… ;-)) have somewhat dubious Apache configurations or use versions of mod_rewrite from the mediveal age. (because updating is money or so…)

Anyhow. This makes this explicitly an opt-in configuration flag. If `htaccess.RewriteBase` is set then it will configure index.php-less URLs, if
admins set that after installation and don't want to wait until the next ownCloud version they can run `occ maintenance:update:htaccess`.

For ownCloud 9.0 we also have to add a repair step to make sure that instances that already have a RewriteBase configured continue to use it by copying it into the config file. That way all existing URLs stay valid. That one is not in this PR since this is unneccessary in master.

Effectively this reduces another risk of breakage when updating from ownCloud 8 to ownCloud 9.

Fixes https://github.com/owncloud/core/issues/24525, https://github.com/owncloud/core/issues/24426 and probably some more.
2016-05-12 09:43:26 +02:00
Jenkins for ownCloud c5ae14453a [tx-robot] updated from transifex 2016-05-12 02:08:58 -04:00
Jörn Friedrich Dreyer e03f9e8103 allow configuration of memcached options (#23729)
* allow configuration of memcache options

Use production values for memcached as explained in http://apprize.info/php/scaling/15.html

The current implementiation uses ascii based serialization. This PR should reduce traffic to the memcached server.

cc @MorrisJobke @FelixBoehm

* add config sample

* merge config options, throw hint on config error

* fix typo

* fix config sample
2016-05-11 19:38:00 +02:00
Thomas Müller 8729415880 Merge pull request #24531 from owncloud/psr4-loading-for-install-and-commands
Correctly register PSR-4 autoloading before install.php and loading commands
2016-05-11 13:53:16 +02:00
Christoph Wurst 0486d750aa
use the UID for creating the session token, not the login name 2016-05-11 13:36:46 +02:00
Christoph Wurst 69dafd727d
delete the token in case an exception is thrown when decrypting the password 2016-05-11 13:36:46 +02:00
Christoph Wurst af707fba41
use the query builder instead of raw sql statements 2016-05-11 13:36:46 +02:00