Commit Graph

2488 Commits

Author SHA1 Message Date
Roeland Jago Douma 0832cca54e [Share 2.0] Fix IShare 2016-01-27 22:04:09 +01:00
Lukas Reschke cb1a64b949 Check whether ownCloud is installed
ownCloud might not yet be setup. This causes an issue as the user config requires a setup ownCloud. Thus this needs a block whether ownCloud is installed or not.

Fixes https://github.com/owncloud/core/issues/21955
2016-01-27 18:30:18 +01:00
Thomas Müller 6973718fb8 Merge pull request #21940 from owncloud/share2_do_not_returned_removed_group_shares
[Share 2.0] Properly handle user deleted group shares
2016-01-27 16:16:06 +01:00
Joas Schilling 2563c3ffaf Fix failing oracle and postgres tests 2016-01-27 12:53:44 +01:00
Robin Appelman 644a8ab797 add IUserMountCache->getMountsForFileId 2016-01-27 12:53:44 +01:00
Thomas Müller 1594371c8c Merge pull request #21741 from owncloud/l10n-improvements
Move methods to the factory that are not related to translating, but to guessing/finding the language
2016-01-27 09:37:00 +01:00
Thomas Müller 5b7a1b13f3 Merge pull request #21887 from owncloud/share2_updateShare
[Sharing 2.0] update share
2016-01-27 09:36:41 +01:00
Thomas Müller c274f03e12 Merge pull request #21906 from owncloud/querybuilder-clob-comparison
Querybuilder clob comparison
2016-01-27 09:36:21 +01:00
Roeland Jago Douma a4900d721f [Share 2.0] Properly handle user deleted group shares
If a user deletes a group share we create a special share entry. To the
API this is just a normal group share for that user with permissions 0.
But we should not return this.
2016-01-27 09:02:12 +01:00
Roeland Jago Douma d11682dcb4 Fix comments from Thomas 2016-01-26 15:31:52 +01:00
Joas Schilling 7514695399 Fix Oracle comparisons 2016-01-26 14:56:07 +01:00
Joas Schilling bd444ae3c3 Add tests for clob comparisons 2016-01-26 14:56:07 +01:00
Roeland Jago Douma c090d709e7 We must resolve to the proper usergroup share 2016-01-26 14:14:54 +01:00
Joas Schilling f413b3ff3a Add tests for findAvailableLanguages 2016-01-26 14:02:32 +01:00
Joas Schilling 70396581eb Add tests for findLanguage() 2016-01-26 14:02:32 +01:00
Joas Schilling fe411788b7 Remove tests for wrapper 2016-01-26 14:02:31 +01:00
Joas Schilling b24b198a83 Add tests for the factory 2016-01-26 14:02:31 +01:00
Joas Schilling 8f9cc51559 Add tests for the new l10n class 2016-01-26 14:02:31 +01:00
Joas Schilling 1199619518 Move legacy test file to new location 2016-01-26 14:02:31 +01:00
Joas Schilling 2cb26a9151 Fix the tests 2016-01-26 14:02:31 +01:00
Joas Schilling 043625ee52 Move findLanguage() and setLanguageFromRequest() to factory 2016-01-26 14:02:31 +01:00
Roeland Jago Douma 44c073b1e6 [share 2.0] manager unit tests 2016-01-26 13:59:58 +01:00
Roeland Jago Douma 59c2aae54f [Share 2.0] Fix unit tests 2016-01-26 13:59:58 +01:00
Roeland Jago Douma 7239fea0f0 [Share 2.0] Add unit test for the default share provider 2016-01-26 13:59:58 +01:00
Thomas Müller 5285460669 Merge pull request #21845 from owncloud/sync-system-addressbook-on-avatar-change
Changing the avatar of the user emits the changeUser event which trig…
2016-01-26 11:37:17 +01:00
Thomas Müller 2bafb1c649 Merge pull request #21894 from owncloud/refactor-csrf
Add new CSRF manager for unit testing purposes
2016-01-26 11:36:56 +01:00
Thomas Müller a1ca9de0f5 Trigger change on avatar delete 2016-01-25 20:56:04 +01:00
Thomas Müller 68ef6e1bdd Assert that User::triggerChange is called upon avatar change 2016-01-25 20:05:11 +01:00
Thomas Müller f165ad8864 Changing the avatar of the user emits the changeUser event which triggers update of the system addressbook 2016-01-25 20:05:11 +01:00
Lukas Reschke a977465af5 Add new CSRF manager for unit testing purposes
This adds a new CSRF manager for unit testing purposes, it's interface is based upon https://github.com/symfony/security-csrf. Due to some of our required custom changes it is however not possible to use the Symfony component directly.
2016-01-25 20:03:40 +01:00
Thomas Müller 728caf13f8 Adding support of -1 as size to be passed into get and getFile 2016-01-25 16:54:40 +01:00
Thomas Müller 99e9c81c8b Merge pull request #21841 from owncloud/share2_deletefromself
[Share 2.0] Add deleteFromSelf method
2016-01-22 17:27:17 +01:00
Thomas Müller 7731b29136 Merge pull request #21719 from owncloud/move-notification-api-to-ocp
Move the notification API to public namespace
2016-01-22 16:20:26 +01:00
Roeland Jago Douma a6600e95dc [Share 2.0] Add deleteFromSelf method
This allows recipient to delete a share. For user shares this is the
same as deleting (at least for now).
But for group shares this means creating a new share with type 2. With
permissions set to 0.
2016-01-22 15:06:50 +01:00
Thomas Müller 9b4c9a0357 Merge pull request #18531 from owncloud/ext-user-credentials
External storage 'Login credentials' auth mechanism
2016-01-22 13:14:14 +01:00
Thomas Müller 0bccdbc959 Merge pull request #21849 from owncloud/add-custom-marker-into-htaccess
Add custom marker into htaccess and execute integrity check after installation
2016-01-22 13:13:59 +01:00
Thomas Müller e3013a99ef Merge pull request #21816 from owncloud/require-a-specific-path-instead-of-autoguessing
Use path instead of app id for occ app signing
2016-01-22 13:13:41 +01:00
Lukas Reschke bc62aa1ef5 Exclude .htaccess modifications from code checker
After the initial installation ownCloud will write some content into the .htaccess file such as the 404 or 403 directives. This adds a magic marker into the .htaccess file and only the content above this marker will be compared in the integrity checker.
2016-01-22 11:51:54 +01:00
Thomas Müller 1410120758 Merge pull request #20768 from owncloud/mount-cache
cache mountpoints in the db
2016-01-22 11:01:54 +01:00
Joas Schilling ee02165005 Move the notification API to public namespace 2016-01-22 10:32:42 +01:00
Thomas Müller e2e5eedb40 Merge pull request #21824 from owncloud/list-of-notifiers
Make it possible to get a list of notifiers for a potential settings …
2016-01-22 10:24:46 +01:00
Joas Schilling 3cca8498cb Make it possible to get a list of notifiers for a potential settings page 2016-01-22 08:47:21 +01:00
Roeland Jago Douma 9b5ea18ce5 Add Unit tests for the default share provider 2016-01-21 16:06:12 +01:00
Thomas Müller e2f231d051 Merge pull request #21761 from owncloud/share2_link
Share2 link
2016-01-21 15:43:08 +01:00
Thomas Müller 7c7467fe42 Merge pull request #21792 from owncloud/systemtags-managerfactory
Allow custom implementation of system tag managers
2016-01-21 12:13:01 +01:00
Roeland Jago Douma 88bc8634d2 Add Unit tests 2016-01-20 21:56:55 +01:00
Lukas Reschke ea367b598a Use path instead of app id
This change requires the usage of a path instead of the App ID when signing code. This has the advantage that developers can also sign code under a different location to make it easier. (e.g. remove `.git`, …)

Also it adds an example command usage as well as a link to the documentation
2016-01-20 20:38:18 +01:00
Vincent Petry 899f9bd113 Allow custom implementation of system tag managers
Added config.php option to replace the default implementation of system
tag manager and system tag object mapper.

Also adjusted the comments manager factory to inject the server container
2016-01-20 16:36:10 +01:00
Robin Appelman 99415a9f7f multiple minor fies 2016-01-20 16:32:52 +01:00
Robin Appelman 222e719c87 sort in tests 2016-01-20 16:30:22 +01:00
Robin Appelman 8940429976 log duplicates 2016-01-20 16:30:22 +01:00
Robin Appelman cf6ee1c866 cache mountpoints in the db 2016-01-20 16:30:22 +01:00
Thomas Müller aeb89947a2 Introduce IUser::setEMailAddress and add hook mechanism 2016-01-20 14:57:20 +01:00
Roeland Jago Douma 7a946a05f5 Properly DI the servercontainer 2016-01-20 08:33:36 +01:00
Morris Jobke 930555bd5e properly use standard
* JEDEC standard - https://en.wikipedia.org/wiki/JEDEC_memory_standards#Unit_prefixes_for_semiconductor_storage_capacity
2016-01-19 10:41:12 +01:00
Thomas Müller 14c98b4df7 Merge pull request #21519 from owncloud/propagate-folder-size
propagate folder size in the same query for write updates
2016-01-18 16:57:30 +01:00
Robin Appelman 7ba715d144 fix test 2016-01-18 12:08:58 +01:00
Robin McCorkell da4127d23b Introduce CredentialsManager for storage of credentials in DB
CredentialsManager performs a simple role, of storing and retrieving
encrypted credentials from the database. Credentials are stored by user
ID (which may be null) and credentials identifier. Credentials
themselves may be of any type that can be JSON encoded.

The rationale behind this is to avoid further (mis)use of
oc_preferences, which was being used for all manner of data not related
to user preferences.
2016-01-18 11:10:41 +01:00
Robin McCorkell 88cd615214 Introduce IDBConnection::setValues()
setValues() attempts to insert a new row, or failing that, update an
existing row. The ability to set preconditions is also available.
2016-01-18 11:10:41 +01:00
Thomas Müller 807cf750b3 Merge pull request #21705 from owncloud/improve-background-job-message
Improve background job error message
2016-01-15 20:12:26 +01:00
Robin Appelman ddbbe1742f propagate folder size in the same query for write updates 2016-01-15 15:36:52 +01:00
Thomas Müller f6c4b10189 Add message key to context of logException 2016-01-15 14:55:30 +01:00
Thomas Müller b37634a57d Merge pull request #21721 from owncloud/capped-memcache-indirect-set
Allow indirect set in CappedMemoryCache
2016-01-15 12:37:36 +01:00
Thomas Müller d8867f7692 Merge pull request #21723 from owncloud/prevent-group-enable-for-apps
Prevent group enable for apps
2016-01-15 12:26:43 +01:00
Thomas Müller 52040a3f23 Merge pull request #20898 from owncloud/cache-interfaces
Public Cache interfaces
2016-01-15 12:02:31 +01:00
Joas Schilling e3a0858444 Check whether the app can be enabled for groups 2016-01-14 15:45:48 +01:00
Robin Appelman d195584a32 Allow indirect set in CappedMemoryCache 2016-01-14 15:00:41 +01:00
Robin Appelman d2c579e167 fix quota wrapper 2016-01-14 12:54:42 +01:00
Robin Appelman 62d383e1ba fix tests 2016-01-14 12:54:42 +01:00
Roeland Jago Douma 0f454ff5aa Use namedparameter 2016-01-14 10:54:40 +01:00
Morris Jobke 86f08f59d6 use logException() to properly log the exception 2016-01-14 10:40:23 +01:00
Morris Jobke 64c8427d81 Improved error message for failing background job 2016-01-14 09:49:40 +01:00
Roeland Jago Douma 4cc2230c58 [Share 2.0] Fix pre_share and post_share hooks 2016-01-13 21:56:04 +01:00
Roeland Jago Douma 5f5951c8cf [Share 2.0] Let the factory do the factory stuff
* Updated unit tests (bit cleaner now)
2016-01-13 16:35:15 +01:00
Roeland Jago Douma cbd3050f4c [Share 2.0] Use full share id (providerId:shareId)
Now that we support multiple managers we communicate shares to the
outside as 'providerId:shareId'. This makes sures that id's are unique
when references from the OCS API.

However, since we do not want to break the OCS API v1 we need to
somewhat hack around this.

When we switch to OCS API v2 (which we should when we support more
custom providers). We will change the id to always be the fullShareId.
2016-01-13 16:35:15 +01:00
Roeland Jago Douma 67b7ebccd1 [Share 2.0] Add share provider factory
* Add providers
* Add share manager to server container
* Use share manager from server container
* Properly get the share manager
2016-01-13 16:35:14 +01:00
Roeland Jago Douma b4de427c1e [Share 2.0] Allow registering of share providers
* Properly register the default share provider
2016-01-13 16:35:07 +01:00
Thomas Müller 3ee3d02a76 Merge pull request #20018 from owncloud/cache_group_backend
The group database backend should cache groups
2016-01-13 15:58:21 +01:00
Lukas Reschke 0c65f4b2c6 Fix unit test
No idea why they passed locally before as well on the branch on the PR. Scary...
2016-01-13 11:22:44 +01:00
Thomas Müller 37e8a87d46 Merge pull request #21591 from owncloud/add-code-checking-for-apps
Verify signature of apps with level "Official" coming from the appstore
2016-01-13 10:35:00 +01:00
Thomas Müller 5565b19382 Merge pull request #21648 from owncloud/smb-statcache-cap
cap the number of entries we cache in smb's statcache
2016-01-13 10:33:43 +01:00
Lukas Reschke 08e73d2c8f Add hidden config switch to disable code integrity checking
This adds a hidden config flag that allows somebody to disable the code integrity check. If `integrity.check.disabled` is set to `true` in the config file:

1. The integrity check functions will return always an empty result
2. The integrity check is not performed when installing apps
3. The integrity check is not performed when updating apps
4. The integrity check is not performed when updating the core

Furthermore this adds support for a list of channels that the code checker will run on. At the moment this is only stable because I didn't want to break any build scripts that we have. Once we have a proper CA setup and updated the build process to sign the releases we can add the RC, alpha, beta as well as daily releases. So everything except "git" basically.
2016-01-12 18:48:36 +01:00
Robin Appelman d8d6368dd7 cap the number of entries we cache in smb's statcache 2016-01-12 13:26:58 +01:00
Robin Appelman c15cab7ed6 Allow admins to add system wide root certificates 2016-01-12 12:50:59 +01:00
Thomas Müller 3ec8789c77 Merge pull request #21628 from owncloud/deprecated_secure_random_funcions
Replace deprecated function calls to SecureRandom
2016-01-12 09:12:13 +01:00
Roeland Jago Douma 3c8f4784e9 Inject DBConnection
* Use query builder
* Minor unit tests additions
2016-01-12 08:24:08 +01:00
Roeland Jago Douma 07fd3889b1 Fix unit tests 2016-01-11 20:29:48 +01:00
Roeland Jago Douma 876fb83ddc getMediumStrengthGenerator is deprecated and does not do anything anymore 2016-01-11 20:06:30 +01:00
Roeland Jago Douma 98c4951f45 getLowStrengthGenerator does not do anything anymore 2016-01-11 19:59:15 +01:00
Roeland Jago Douma eccd9ca1cb Remove unused deprecated function 2016-01-11 16:41:46 +01:00
Roeland Jago Douma e01a488b31 Remove generateRandomBytes from OC_Util 2016-01-10 22:07:33 +01:00
Lukas Reschke c009d5dcc1 Verify signature of apps with level "Official" coming from the appstore
This change will verify the signature of all apps with the level "Official" coming from the appstore or if they have been signed before.
2016-01-10 19:40:28 +01:00
Thomas Müller a1a8a06042 Merge pull request #21527 from owncloud/remove_all_avatars
Remove all cache avatars on avatar deletion
2016-01-08 09:41:25 +01:00
Roeland Jago Douma 4e6f6518ff Remove all cache avatars on avatar deletion
Fixes #21513

Since we cache the generated avatars. We should also delete the
generated sizes when we remove the avatar.
2016-01-07 20:51:18 +01:00
Thomas Müller 1cc6fddead Merge pull request #21498 from owncloud/cleanup-OC_DB
Cleanup OC_DB methods
2016-01-07 20:13:16 +01:00
Thomas Müller f6f492ba4e Merge pull request #21502 from owncloud/di_mimetypedetector
Add 'OCP\Files\IMimeTypeDetector' to DI container
2016-01-07 16:18:55 +01:00
Thomas Müller 9ca670f94f Merge pull request #21505 from owncloud/allow-downgrades-for-brave-developers
Allow downgrades for our brave developers, that switch between branches
2016-01-07 16:03:36 +01:00
Thomas Müller 601457d221 Merge pull request #20773 from owncloud/share2.0_create
[Sharing 2.0] create share
2016-01-07 14:57:05 +01:00
Morris Jobke 190cc2bb67 Remove OC_DB::getConnection 2016-01-07 14:54:55 +01:00
Morris Jobke fddece9552 Remove OC_DB::insertid 2016-01-07 14:54:55 +01:00