Commit graph

5081 commits

Author SHA1 Message Date
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
Morris Jobke
e43aaf4a15 Avoid error message in log during setup because of existing data dir 2016-01-26 18:50:41 +01:00
Thomas Müller
aa598fc701 Merge pull request #21664 from owncloud/comments-dav
Comments DAV implementation
2016-01-26 17:20:32 +01:00
Lukas Reschke
8a4e1fbecd Fix errors after install
When installing ownCloud the first time the first thing that an admin saw was an error message:

> Error   PHP   touch(): Unable to create file owncloud.log because Permission denied at /var/www/owncloud/lib/private/log/owncloud.php#48

Or something related. This lead to a lot confusion as can be seen in our forum and in our issue tracker. This change should make the error messages disappear in most cases (e.g. where the file can actually be written). To test this:

1. On master install ownCloud and check owncloud.log => Error message
2. On this branch install ownCloud and check owncloud.log => No error message

Fixes https://github.com/owncloud/core/issues/13736 and https://github.com/owncloud/core/issues/12893
2016-01-26 17:06:23 +01:00
Roeland Jago Douma
d11682dcb4 Fix comments from Thomas 2016-01-26 15:31:52 +01:00
Joas Schilling
01164e89a4 Move parameter to the right function call 2016-01-26 14:56:07 +01:00
Joas Schilling
76f506e264 Use our OCP constants 2016-01-26 14:56:07 +01:00
Joas Schilling
a0e8a9de61 Introduce helper method 2016-01-26 14:56:07 +01:00
Joas Schilling
7514695399 Fix Oracle comparisons 2016-01-26 14:56:07 +01:00
Joas Schilling
90ce876378 Adjust comments to the new constants 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
3a6390031c Move class to legacy folder 2016-01-26 14:10:05 +01:00
Joas Schilling
70396581eb Add tests for findLanguage() 2016-01-26 14:02:32 +01:00
Joas Schilling
b24b198a83 Add tests for the factory 2016-01-26 14:02:31 +01:00
Joas Schilling
2cb26a9151 Fix the tests 2016-01-26 14:02:31 +01:00
Joas Schilling
c7abe68776 Deprecate OC_L10N in favor of a namespaces and DI version 2016-01-26 14:02:31 +01:00
Joas Schilling
4ea0d3c05d Deprecate getFirstWeekDay() and getDateFormat() in favor of l() 2016-01-26 14:02:31 +01:00
Joas Schilling
6652a0fb6c Move finding the language files and creating the function out of the object 2016-01-26 14:02:31 +01:00
Joas Schilling
7ec7464ee2 Move validation and fallbacks of app and lang to the constructor/factory 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
Joas Schilling
29a9306429 Move languageExists() to the factory 2016-01-26 14:02:31 +01:00
Joas Schilling
6aec550d6e Move findAvailableLanguages() to the factory 2016-01-26 14:02:30 +01:00
Roeland Jago Douma
e508bcb7a7 [Share 2.0] Fire off hook 2016-01-26 13:59:58 +01:00
Roeland Jago Douma
46045ecc52 [Share 2.0] Add update share 2016-01-26 13:59:58 +01:00
Arthur Schiwon
ed546bd2a5 Comments DAV implementation 2016-01-26 12:10:14 +01:00
Thomas Müller
3da78c8f1c Merge pull request #21901 from owncloud/fix-setup
Fix setup page
2016-01-26 11:42:55 +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
Morris Jobke
2ecc202843 Fix setup page
* fixes #21897
2016-01-26 09:05:10 +01:00
Thomas Müller
4c9e328211 Merge pull request #21892 from owncloud/issue-21890-parameters
Add parameters types to IQueryBuilder
2016-01-25 21:13:41 +01:00
Thomas Müller
a1ca9de0f5 Trigger change on avatar delete 2016-01-25 20:56:04 +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
12b22c2759 Regenerate CSRF token upon login
Otherwise somebody else might be able to note down the CSRF token before login on a shared computer.
2016-01-25 20:03:40 +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
Joas Schilling
09ae160463 Replace other usages 2016-01-25 17:17:36 +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
d69167caff Merge pull request #21424 from owncloud/appversions
Use appConfig to get app versions
2016-01-25 10:02:02 +01:00
Thomas Müller
adf532fe4e Merge pull request #21806 from owncloud/mdusher-master
[jenkins] Added ' to characters allowed in the username
2016-01-25 10:01:43 +01:00
Thomas Müller
ef4fca22d1 Merge pull request #21844 from owncloud/drop-image-path
Remove OC_Helper::imagePath and use the proper public interface
2016-01-25 10:00:21 +01:00
Morris Jobke
287e6d36bf remove unused variable 2016-01-25 09:29:44 +01:00
Morris Jobke
75e6734ef4 Remove OC_Helper::imagePath and use the proper public interface 2016-01-24 18:04:20 +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
a203089cfd Merge pull request #21836 from RomanKreisel/master
Solves #21835 (https://github.com/owncloud/core/issues/21835)
2016-01-22 17:26:28 +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
Joas Schilling
31c5848e51 Allow automatic injection of the Manager 2016-01-22 11:02:40 +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
Morris Jobke
75ee5a9e9a Fix PHPDoc - @changed is no official tag -> use @since 2016-01-22 08:43:05 +01:00
Roman Kreisel
b35aa513ab Solves # 2016-01-21 17:29:14 +01:00
Roeland Jago Douma
658959592d [Share 2.0] Fix displaying old shares proplery 2016-01-21 16:06:12 +01:00
Roeland Jago Douma
3a582e88e5 Comments from Vincent 2016-01-21 16:06:12 +01:00
Roeland Jago Douma
9b5ea18ce5 Add Unit tests for the default share provider 2016-01-21 16:06:12 +01:00
Roeland Jago Douma
0a9cd91e1d [Share 2.0] Add subfiles=x 2016-01-21 15:56:44 +01:00
Roeland Jago Douma
0c9f881e7d [Share 2.0] Resolve group shares 2016-01-21 15:56:44 +01:00
Roeland Jago Douma
3666c34a19 [Sharing 2.0] Start with getShares 2016-01-21 15:56:44 +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
Thomas Müller
2f7dcf1a2c Merge pull request #21782 from owncloud/update-system-addressbook-on-user-change-2
Introduce IUser::setEMailAddress and add hook mechanism
2016-01-21 00:07:46 +01:00
Roeland Jago Douma
e40d21673e [Share 2.0] Add fetching link shares to share manager 2016-01-20 21:12:26 +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
8a4c0829fb use insertifnotexists 2016-01-20 16:32:56 +01:00
Robin Appelman
483c6b68e2 clear mount cache when removing applicables 2016-01-20 16:32:56 +01:00
Robin Appelman
bc7bd0cd05 handle changed mount points 2016-01-20 16:32:56 +01:00
Robin Appelman
be380accb9 clear mount cache when deleting user 2016-01-20 16:32:56 +01:00
Robin Appelman
99415a9f7f multiple minor fies 2016-01-20 16:32:52 +01:00
Robin Appelman
fd37e72ee9 use getmountmanager 2016-01-20 16:30:22 +01:00
Robin Appelman
8940429976 log duplicates 2016-01-20 16:30:22 +01:00
Robin Appelman
f986fb99f2 Filter uncached mounts 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
647d8ea5de Merge pull request #21775 from owncloud/apcu-iterator-constructor
Fix constructor arguments for APCUIterator
2016-01-20 15:23:01 +01:00
Thomas Müller
51b50bd260 Emit OC\User::changeUser on change of display name 2016-01-20 14:57:20 +01:00
Thomas Müller
aeb89947a2 Introduce IUser::setEMailAddress and add hook mechanism 2016-01-20 14:57:20 +01:00
Morris Jobke
7b54bf26ea fix error message and comment 2016-01-20 14:21:54 +01:00
Michael U
dbfa143e2d Added ' to characters allowed in the username 2016-01-20 14:11:27 +01:00
Roeland Jago Douma
7a946a05f5 Properly DI the servercontainer 2016-01-20 08:33:36 +01:00
Thomas Müller
f0f308dfbf Merge pull request #21744 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2016-01-19 12:17:25 +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
Roeland Jago Douma
0939520e1a [Share 2.0] Share Object creation is a fragile thing
* We can't assume that the file still exists
* We can't assume that the user/group still exists

Basically we do not always nicely cleanup shares.
2016-01-18 19:57:30 +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
58afddfaa5 allow comparing clob using expressionbuilder->eq if you explicitly say you're comparing strings 2016-01-18 16:03:41 +01:00
Robin Appelman
a225fe4c96 Fix constructor arguments for APCUIterator 2016-01-18 12:20:05 +01:00
Robin Appelman
ebd15fd5ed handle bool in setValue 2016-01-18 12:09:01 +01:00
Robin Appelman
895fd49fb2 also handle not null violations 2016-01-18 12:09:01 +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
fcec704174 Merge pull request #21730 from owncloud/fix-install-of-shipped-apps
Fix installation of shipped apps
2016-01-15 14:33:40 +01:00
Thomas Müller
b7c0dc46be Merge pull request #21702 from owncloud/fix_emit_scanFiles_II
Fix: emit 'scanFiles' will only fire on files and not on folders (II)
2016-01-15 14:31:49 +01:00
Scrutinizer Auto-Fixer
83a8e75614 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-01-15 12:54:26 +00:00
Thomas Müller
6824704699 Merge pull request #21117 from owncloud/owner-file-exists
Only return an owner if the file exists + improved getUidAndFilename
2016-01-15 13:31:56 +01:00