Commit Graph

958 Commits

Author SHA1 Message Date
Robin Appelman 778d8dbafd Add tableExists to public db api 2014-12-09 17:26:53 +01:00
Robin Appelman 8af3991d0c Add dropTable to IDBConnection 2014-12-09 17:26:53 +01:00
Joas Schilling d69ea30097 Add a DateTimeFormatter class which allows overwriting the language and timezone
Fix #12227
2014-12-09 16:10:24 +01:00
Joas Schilling f53f25eafe Merge pull request #12409 from owncloud/tags-getTagsForObjectIds
Add getTagsForObjects in ITags
2014-12-09 13:27:38 +01:00
Lukas Reschke 4c13918bd8 Expose backend type via REST API
This change will expose the user backend via the REST API which is a pre-requisite for https://github.com/owncloud/core/issues/12620.

For example:
````json
[{"name":"9707A09E-CA9A-4ABE-A66A-3F632F16C409","displayname":"Document Conversion User Account","groups":[],"subadmin":[],"quota":"default","storageLocation":"\/Users\/lreschke\/Programming\/core\/data\/9707A09E-CA9A-4ABE-A66A-3F632F16C409","lastLogin":0,"backend":"OCA\\user_ldap\\USER_LDAP"},{"name":"ED86733E-745C-4E4D-90CB-278A9737DB3C","displayname":"Hacker","groups":[],"subadmin":[],"quota":"default","storageLocation":"\/Users\/lreschke\/Programming\/core\/data\/ED86733E-745C-4E4D-90CB-278A9737DB3C","lastLogin":0,"backend":"OCA\\user_ldap\\USER_LDAP"},{"name":"71CDF45B-E125-450D-983C-D9192F36EC88","displayname":"admin","groups":[],"subadmin":[],"quota":"default","storageLocation":"\/Users\/lreschke\/Programming\/core\/data\/71CDF45B-E125-450D-983C-D9192F36EC88","lastLogin":0,"backend":"OCA\\user_ldap\\USER_LDAP"},{"name":"admin","displayname":"admin","groups":["admin"],"subadmin":[],"quota":"default","storageLocation":"\/Users\/lreschke\/Programming\/core\/data\/admin","lastLogin":"1418057287","backend":"OC_User_Database"},{"name":"test","displayname":"test","groups":[],"subadmin":[],"quota":"default","storageLocation":"\/Users\/lreschke\/Programming\/core\/data\/test","lastLogin":0,"backend":"OC_User_Database"}]
```
2014-12-09 12:04:19 +01:00
Thomas Müller c36bac3abd Merge pull request #12406 from owncloud/drop-getApps-getUsers
Config cleanup - OC_Preferences refactoring
2014-12-09 09:36:38 +01:00
Lukas Reschke 25a87d4058 Merge pull request #12577 from owncloud/public-mount-api
Add a public api for apps to add mounts
2014-12-08 22:57:33 +01:00
Morris Jobke 0d4f0ab871 reduce OC_Preferences, OC_Config and \OCP\Config usage
* files_encryption
* files_versions
* files_trashbin
* tests
* status.php
* core
* server container
2014-12-08 22:42:37 +01:00
Morris Jobke af91ee97c9 introduce preCondition for setUserValue to provide atomic check-and-update 2014-12-08 22:33:36 +01:00
Morris Jobke f0b10324ca Refactoring of OC_Preferences to AllConfig
* keep old static methods - mapped to new ones and deprecated
* removed deleteApp, getUsers, getApps because they are unused
* make AllConfig unit tests more robust against not cleaned up environments
2014-12-08 22:33:29 +01:00
Morris Jobke 719008836d introduce deleteAllUserValues 2014-12-08 22:29:42 +01:00
Morris Jobke 985b15f770 introduce proper interface for deleteAppValue 2014-12-08 22:29:42 +01:00
Morris Jobke b01c59b224 use old methods and redirect in deprecated methods 2014-12-08 22:29:42 +01:00
Morris Jobke d6da627eb4 @deprecated messages for \OCP\Config and \OCP\AppConfig 2014-12-08 22:29:42 +01:00
Morris Jobke 50c2a819a0 Extract interaction with config.php into SystemConfig
* introduce SystemConfig to avoid DI circle (used by database connection which is itself needed by AllConfig that itself contains the methods to access the config.php which then would need the database connection - did you get it? ;))
* use DI container and use that method in legacy code paths (for easier refactoring later)
* create and use getSystemConfig instead of query() in DI container
2014-12-08 22:29:42 +01:00
Vincent Petry cae600722e Add getTagsForObjects in ITags
Returns the list of tags that are set on the given object ids.
2014-12-08 22:02:00 +01:00
Morris Jobke 1362c0b67a Merge pull request #12452 from owncloud/server2server-ng-ocs
OCS API for server-to-server sharing
2014-12-08 14:12:03 +01:00
Robin Appelman f4701d7721 Add public api for mount configurations 2014-12-04 16:47:27 +01:00
Lukas Reschke db9765b4d5 Merge headers
Otherwise the headers from `JSONResponse` are gone and the Content-Type of the response would be `text/html` instead of `application/json; charset=utf-8`. This leads to broken scripts since we set the `nosniff` tag, furthermore this is very bad from a security PoV.
2014-12-04 14:45:15 +01:00
Bjoern Schiessle 698ecbf308 OCS API for server-to-server sharing 2014-12-04 13:18:13 +01:00
Morris Jobke 5b3dbb4ef8 add missing public interface for iOS client app id 2014-12-02 16:10:07 +01:00
Lukas Reschke ffd1fc42e7 Merge pull request #12427 from owncloud/issue/6101-deprecate-namespaced-functions
Depcrate namespaced functions, since they can not be autoloaded
2014-12-01 09:38:15 +01:00
Bjoern Schiessle 00ad7d48c7 add activity priorities to core so that other apps can reuse it 2014-11-28 10:37:16 +01:00
Morris Jobke b188710af3 Merge pull request #12472 from owncloud/modifyCookies
Add functions to modify cookies to response class
2014-11-28 10:16:22 +01:00
Joas Schilling 7b8824a4e3 Move iHomeStorage to own file 2014-11-27 17:47:20 +01:00
Joas Schilling dfde04291e Move share interfaces to own files so they can be autoloaded 2014-11-27 17:47:19 +01:00
Lukas Reschke d197f43475 Use server container 2014-11-27 14:36:11 +01:00
Lukas Reschke 048139074d Add functions to modify cookies to response class
Currently there is no AppFramework way to modify cookies, which makes it unusable for quite some use-cases or results in untestable code.

This PR adds some basic functionalities to add and invalidate cookies.

Usage:
```php
$response = new TemplateResponse(...);
$response->addCookie('foo', 'bar');
$response->invalidateCookie('foo');
$response->addCookie('bar', 'foo', new \DateTime('2015-01-01 00:00'));
```

Existing cookies can be accessed with the AppFramework using `$this->request->getCookie($name)`.
2014-11-27 14:19:00 +01:00
Joas Schilling a109f94fee Depcrate namespaced functions, since they can not be autoloaded 2014-11-26 11:01:24 +01:00
Morris Jobke c5fa8f1bdc Merge pull request #12421 from owncloud/issue/6101-remove-namespace-permission-constants
Issue/6101 remove namespace permission constants
2014-11-26 08:31:23 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Joas Schilling 711912a7b3 Move namespaced constants to namespaced class 2014-11-25 16:27:27 +01:00
Thomas Müller c503ecd544 Introduce app info xml parser including basic unit test - necessary for #10777 2014-11-25 11:53:28 +01:00
Morris Jobke 1b17429c1d Merge pull request #12142 from owncloud/DeprecateOldIAPICalls
Deprecate older API wrappers and calls
2014-11-24 14:01:49 +01:00
Bjoern Schiessle a7ebfe87c9 also check for the correct owner if it was submitted 2014-11-21 16:17:37 +01:00
Lukas Reschke 4302a78b27 Deprecate older API wrappers and calls
Those old classes have now non-static pendants and can be deprecated IMHO.
2014-11-12 17:39:25 +01:00
Robin Appelman 43eb375ace Add \OC\App\Manager to handle enabling/disabling apps 2014-11-10 13:52:52 +01:00
Lukas Reschke 8f1fa32e1f Merge pull request #11998 from owncloud/add-get-logger-to-interface
Add getLogger() to IServerContainer
2014-11-06 16:04:54 +01:00
Lukas Reschke 24ca2d858f Add OCP\Security\IHasher
Public interface for hashing which also works with legacy ownCloud hashes and supports updating the legacy hash via a passed reference.

Follow-up of https://github.com/owncloud/core/pull/10219#issuecomment-61624662
Requires https://github.com/owncloud/3rdparty/pull/136
2014-11-06 15:16:14 +01:00
Lukas Reschke 0e3e1e3563 Add getLogger() to IServerContainer
Makes my IDE complaining less ;-)
2014-11-06 13:36:36 +01:00
Thomas Müller e624e9064c Merge pull request #11965 from owncloud/fix-jsonresponse
fix typo in content type for JSONResponse
2014-11-05 14:03:12 +01:00
Bernhard Posselt 91a23bfa9c fix typo in content type 2014-11-05 12:04:56 +01:00
Lukas Reschke be5ae6c44f Support HTML in logo claim 2014-11-03 21:14:27 +01:00
Vincent Petry bed81ea854 Merge pull request #11080 from owncloud/addheader-text-2
Fix the addHeader tag attributes text methods to not ignore the text parameter
2014-10-30 18:13:46 +01:00
Morris Jobke e2001c6d31 Merge pull request #11821 from owncloud/generic-response
Add a generic data response
2014-10-30 14:05:25 +01:00
Vincent Petry ec1a73fab9 Added OC.L10N namespace with translation functions
Added addTranslations and fixed de.js file

Fixed de.js to use OC.L10N.register() and use to correct expected
format.

Added JS unit tests for OC.L10N class

Include translations JS script for all apps
2014-10-29 10:09:12 +01:00
Bernhard Posselt 0696099bad add dataresponse
fix docstrings

adjust copyright date

another copyright date update

another header update

implement third headers argument, fix indention, fix docstrings

fix docstrings
2014-10-29 09:43:47 +01:00
Lukas Reschke 510d0b2cf3 Fix the "addHeader($tag, $attributes, $text)" methods to not ignore the $text parameter
Also support closing tags with no text content given

Conflicts:
	lib/private/template.php
2014-10-28 11:15:58 +01:00
Morris Jobke 290e9cd5b2 Merge pull request #11787 from owncloud/fix-php-docs
Fix PHPDoc
2014-10-27 14:46:41 +01:00
Lukas Reschke f7c393fa9f Fix PHPDoc
Stop my IDE and Scrutinizer from complaining.
2014-10-27 13:38:40 +01:00
Morris Jobke 63f2b1f460 Merge pull request #11767 from danbartram/add_db_rollback
Add missing DB rollback functionality
2014-10-24 19:52:56 +02:00
Dan Bartram 9c1015b790 Add missing DB rollback functionality 2014-10-24 17:44:06 +01:00
Robin Appelman 83c74b80ad Add \OC\TempManager to handle creating and cleaning temporary files 2014-10-24 12:18:46 +02:00
Robin Appelman e6f6cdd19f Bit more cleanup 2014-10-22 12:29:53 +02:00
Robin Appelman 97a6f5c46b Extend \OCP\IDBConnection to cover more use cases 2014-10-22 12:26:43 +02:00
Robin Appelman beb1c6ad74 Allow adding events that hapend before the event logger was loaded 2014-10-20 13:38:38 +02:00
Robin Appelman 6e08014781 Rename namespace to Diagnostics 2014-10-20 13:38:38 +02:00
Robin Appelman b71d1d3616 Add QueryLogger interface to allow apps to get a list of used queries 2014-10-20 13:38:37 +02:00
Robin Appelman d38050cf52 Add an EventLogger interface to allow apps to get a log of the request timeline 2014-10-20 13:38:37 +02:00
Bernhard Reiter b416f7d8ac PHPDoc fixes as suggested by @MorrisJobke. 2014-10-14 00:06:33 +02:00
Bernhard Reiter 1770179648 Add getTag() function for accessing of a single tag. 2014-10-14 00:06:33 +02:00
Bernhard Reiter 7e9baafc53 Add option to include tags for shared items. 2014-10-14 00:06:07 +02:00
Bernhard Reiter b33cb0e342 Fix a comment. 2014-10-14 00:06:07 +02:00
Robin Appelman 12ac3a800d Expose getAppKeys trough \OCP\IConfig 2014-10-08 14:22:17 +02:00
Lukas Reschke 8c8e5c168e Merge pull request #10107 from owncloud/sharing_group_shares
[sharing] group shares
2014-09-29 20:26:41 +02:00
Thomas Müller e5a111b80e Merge pull request #11285 from owncloud/dav-permissions-create
Fix dav permissions for folders
2014-09-26 09:21:32 +02:00
Vincent Petry 9fc23e1967 Merge pull request #10934 from owncloud/datadir-write-setup
Don't complain about non-writable datadirs before we're installed
2014-09-25 14:32:32 +02:00
Robin Appelman ccb4475a8d Expose creatable permissions trough fileinfo 2014-09-25 14:00:13 +02:00
Bjoern Schiessle d5fc011c90 some small fixes 2014-09-25 11:29:57 +02:00
Bjoern Schiessle a6cc810349 mark exclude list as deprecated. It neither used by the files app nor by the
calendar or contacts app. It doesn't make sense to build a exclude list by the
share API, the apps knows best which are valid targets.
2014-09-24 14:02:02 +02:00
Lukas Reschke 75e45ac786 Merge pull request #11019 from owncloud/do-not-show-exception-to-enduser
Do not show exception to the end-user - use a proper error page instead
2014-09-23 18:36:40 +02:00
Thomas Müller c587a4aaa2 Merge pull request #11222 from owncloud/store-users-timezone-master
send browsers timezone back tp the server on login
2014-09-23 13:45:21 +02:00
Lukas Reschke 6eeb905871 Do only follow HTTP and HTTPS redirects
We do not want to follow redirects to other protocols since they might allow an adversary to bypass network restrictions. (i.e. a redirect to ftp:// might be used to access files of a FTP server which might be in a secure zone and not be reachable from the net but from the ownCloud server)

Get final redirect manually using get_headers()

Migrate to HTTPHelper class and add unit tests
2014-09-22 20:02:32 +02:00
Thomas Müller 814114ab8e enhance formatDate function to accept an optional argument containing the time zone 2014-09-22 15:03:28 +02:00
Robin Appelman 6fa3280c2a Inject config into checkserver and cleanup tests 2014-09-18 13:33:13 +02:00
Lukas Reschke d07d5915c9 Remove unused and overflowing function
Resolves https://github.com/owncloud/core/issues/10991 failure 4
2014-09-18 10:21:28 +02:00
Lukas Reschke 6d3757f864 Do not show exception to the end-user
Log the error instead of potentially leaking sensitive information
2014-09-17 13:17:52 +02:00
Morris Jobke b644e8a5e7 Merge pull request #10932 from owncloud/issue/10926
Add a method to get the absolute url for a route
2014-09-17 13:05:26 +02:00
Lukas Reschke d2743e6ad6 Merge pull request #7254 from owncloud/core-sortalgo
Fixed JS sort comparator to be consistent between JS and PHP
2014-09-16 17:29:03 +02:00
Lukas Reschke 70abce0482 Merge pull request #10739 from owncloud/eventsource-public
Add EventSource to the public API
2014-09-08 18:46:27 +02:00
Joas Schilling c5b5378558 Add a method to get the absolute url for a route
Fix #10926
2014-09-08 14:43:14 +02:00
Robin Appelman fa3393674c Better phpdoc and method naming 2014-09-04 13:26:51 +02:00
Lukas Reschke 373d1c5e9f Merge pull request #10642 from owncloud/securityutils
Add some security utilities
2014-09-03 15:28:42 +02:00
Lukas Reschke dcea6de26a Fix quoting 2014-09-03 14:16:55 +02:00
Lukas Reschke a54af89d8a Add test for the second argument 2014-09-03 14:13:12 +02:00
Robin Appelman dad53180bc Add event source to the public api 2014-09-03 13:36:15 +02:00
Lukas Reschke 20a7fb0334 Fix CHAR_SYMBOLS 2014-09-03 12:22:21 +02:00
Lukas Reschke 77c0adb520 Merge branch 'securityutils' of https://github.com/owncloud/core into securityutils 2014-09-03 11:04:49 +02:00
Lukas Reschke 50b430ee7c Add char consts, hash the specified password for the HMAC 2014-09-03 11:03:27 +02:00
Morris Jobke 4024960a0e Merge pull request #10780 from owncloud/config-public
Extend public config interface
2014-08-31 15:54:35 +02:00
Lukas Reschke 8009df0b60 Merge pull request #10420 from owncloud/external-share-self-signed
Make external shares work with imported self signed certificates
2014-08-31 15:50:30 +02:00
Robin Appelman 0a1e5aebf1 Extend public config interface 2014-08-31 15:27:36 +02:00
Lukas Reschke ae3425d2da Merge branch 'master' into securityutils
Conflicts:
	lib/private/util.php
2014-08-31 15:21:09 +02:00
Morris Jobke 73685892ed Merge pull request #10770 from owncloud/getUserFolder
update public interface for getUserFolder
2014-08-31 13:26:32 +02:00
Morris Jobke ac6324a5d0 update public interface for getUserFolder 2014-08-31 11:16:40 +02:00
Robin Appelman c158db7200 Add certificate class 2014-08-31 10:47:50 +02:00
Robin Appelman c1b11571ea Move certificate management interface from files_external to core 2014-08-31 10:47:50 +02:00
Robin Appelman ecdbf00628 Move certificate management code to core 2014-08-31 10:45:10 +02:00
Robin Appelman a58e670ae5 Also extend public server interface 2014-08-31 10:20:00 +02:00
Robin Appelman d0266c0bf8 Use public api for getting l10n 2014-08-31 10:08:22 +02:00