Commit graph

1166 commits

Author SHA1 Message Date
Bernhard Posselt
37e8969d34 ignore cursorclosing 2015-01-29 19:16:28 +01:00
Vincent Petry
acec40fe5a Merge pull request #13561 from owncloud/trash-finaldeletewhencrossstoragefix
Call final unlink in trash wrapper's storage
2015-01-27 17:05:38 +01:00
Vincent Petry
12867b9c78 Fix return type of addStorageWrapper in PHPDoc 2015-01-27 16:41:43 +01:00
Thomas Müller
956de27e94 Merge pull request #13676 from owncloud/fix-node-iface
Fix node interface
2015-01-27 09:34:59 +01:00
Bernhard Posselt
b8769802df fix node interface 2015-01-26 15:58:41 +01:00
Joas Schilling
c61e9f3912 Add a method to set/unset multiple config values in one call
This reduces the number of file writes we do for config.php and therefor
hopefully helps lowering the chances for empty config.php files
2015-01-23 11:00:53 +01:00
Vincent Petry
6fb553e92c Do not call wrapStorage if storate with same name added twice 2015-01-22 16:24:24 +01:00
Robin McCorkell
2b99fc76ec Cleanup of PHPDoc return types 2015-01-16 20:30:43 +00:00
Lukas Reschke
0da08bdb2c Add PHPDoc for urlParams 2015-01-15 14:42:44 +01:00
Lukas Reschke
04ae8d2ea0 Add PHPDoc for magic property 'server' 2015-01-14 19:36:22 +01:00
Morris Jobke
6a5f12beca Merge pull request #12988 from owncloud/logfile_download
Logfile download
2015-01-09 00:33:22 +01:00
Georg Ehrke
f579f2bd94 add Download logfile button to admin settings
add logSettingsController

add download logfile button

move getEntries to LogSettingsController

move set log level to logsettingscontroller.php

add warning if logfile is bigger than 100MB

add unit test for set log level

fix typecasting, add new line at EoF

show log and logfile download only if log_type is set to owncloud

add unit test for getFilenameForDownload
2015-01-07 14:55:53 +01:00
Jörn Friedrich Dreyer
79e790c55d add SIZE_ALL const 2015-01-02 10:28:42 +01:00
Jörn Friedrich Dreyer
a8edb2124d fix visibility 2015-01-02 10:28:41 +01:00
Jörn Friedrich Dreyer
606f802b7b move search results below filelist, show hint when results are off screen, use js plugin mechanism 2015-01-02 10:28:41 +01:00
Jörn Friedrich Dreyer
c738359a11 add paged provider 2015-01-02 10:28:41 +01:00
Thomas Müller
5b00bc1d6e Adding basement for the direct download url 2014-12-28 17:17:14 +01:00
Bernhard Posselt
f195123765 Intelligent container
* resolves dependencies by type hint or variable name
* simpler route.php
* implementation of https://github.com/owncloud/core/issues/12829

Generates and injects parameters automatically. You can now build full classes like

    $c->query('MyClassName')

without having to register it as a service. The resolved object's instance will be saved by using registerService. If a constructor parameter is not type hinted, the parameter name will be taken.

Therefore the following two implementations are identical:

    class Class1 { function __construct(MyClassName $class)
    class Class1 { function __construct($MyClassName)

This makes it possible to also inject primitive values such as strings, arrays etc.

In addition if the query could not be resolved, a `QueryException` is now thrown

Routes can now be returned as an array from `routes.php` and an `appinfo/application.php` is optional

Old commit messages:

make it possible to return the routes instead of having to intialize the application
try to get the controller by convention
add first implementation of automatic resolve
add another test just to be sure
store the resolved object
more tests
add phpdoc to public app.php method
use the same variable for the public app.php method
deprecate old methods and add services for public interfaces
deprecated getServer method
disallow private api injection for apps other than core or settings (settings should be an app goddamnit :D)
register userid because its such an often used variable
fix indention and leading slash
use test namespace
add deprecation reasons, remove private api usage checks and remove deprecation from getServer()
add additional public interfaces
add public interface for rootfolder
fix syntax error
remove deprecation from methods where no alternative is there yet
remove deprecated from method which has no alternative
add timezone public service for #12881
add another deprecation hint
move deprecation into separate branch
remove dead comment
first try to get the namespace from the info.xml, if it does not exist, just uppercase the first letter
also trim the namespace name
add an interface for timefactory
move timefactory to public and add icontrollermethodreflector
keep core interface
fix copyright date in headers
2014-12-23 09:50:42 +01:00
Morris Jobke
5d296aa6b1 Merge pull request #12969 from owncloud/clarify-docs
Clarify return values
2014-12-22 10:01:39 +01:00
Morris Jobke
c17b9ec068 Merge pull request #12983 from owncloud/root-iface
Add an interface for the root folder so apps have an interface to deal with storage
2014-12-22 09:05:23 +01:00
Bernhard Posselt
8e37214346 add an interface for the root folder so apps have an interface to deal with storage
fix comments and newline

add newline
2014-12-21 20:52:34 +01:00
Thomas Müller
c3544bd27e Merge pull request #12982 from owncloud/timefac-iface
Add an interface for the timefactory class
2014-12-21 20:27:53 +01:00
Bernhard Posselt
ba03b0b843 add an interface for the timefactory class
fix indention
2014-12-20 15:53:31 +01:00
Björn Schießle
8164415b45 Merge pull request #12749 from owncloud/server2server-sharing-ng
server to server sharing next generation
2014-12-19 19:04:44 +01:00
blizzz
ad6814f920 Merge pull request #12101 from owncloud/ldap_split_mapping
Ldap split mapping from Access superclass
2014-12-19 18:52:30 +01:00
Arthur Schiwon
ec0f80fee9 Split mapping from Access and Helper classes into it's own. Fully test them, too.
remove unused methods

split mapping methods off from Access class

fix DB query handling

move 'clear mapping' methods from static helper to new mapping class

add tests

test directly with DB

finishing tests and fix return value from setDNbyUUID

add corresponding class for groups and make abstract test class neutral. helper tests is now obsolete as the tested functions were moved to the new mapper class.

add missing info to PHPDoc

add unmap method

fix namespaces

fix test inheritance

PHPDoc and a small code restructure for scrutinizer, no effective changes

PostgreSQL does not accept LIMIT in DELETE queries

phpdoc fixes, no code changes
2014-12-19 18:26:12 +01:00
Bjoern Schiessle
24993280ed Next step in server-to-server sharing next generation, see #12285
Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

URL: myPC/firstOwnCloud user: user1
URL: myPC/secondOwnCloud user: user2
Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
2014-12-19 15:20:24 +01:00
Lukas Reschke
dbbf568192 Fix typo 2014-12-19 14:36:00 +01:00
Lukas Reschke
a022e65285 Clarify return values
This function returns `null` when no user is logged-in.
2014-12-19 14:17:40 +01:00
Thomas Müller
2d64797320 Merge pull request #12956 from owncloud/jenkins-user-backend-names
[jenkins only] introduce names for user backends - IUserBackend
2014-12-19 13:15:50 +01:00
Morris Jobke
6da33e1ea7 introduce names for user backends - IUserBackend
* LDAP with multiple servers also proved backendName
2014-12-19 10:17:17 +01:00
Morris Jobke
75e8b39826 Merge pull request #12879 from owncloud/mountconfig
Add mount specific options
2014-12-18 23:38:14 +01:00
Bernhard Posselt
6779bf113d add isAdmin and isInGroup methods for the group manager 2014-12-17 17:41:57 +01:00
Bernhard Posselt
236632702c add a isLoggedIn method to the usersession and deprecate the isLoggedIn method on the api 2014-12-17 17:40:52 +01:00
Robin Appelman
fd85424742 Add getMountPoint to FileInfo 2014-12-17 14:03:50 +01:00
Robin Appelman
95a145f67f Load mount specific options from the mount config 2014-12-17 14:03:50 +01:00
Thomas Müller
77c4c2856a Merge pull request #12889 from owncloud/deprecation-time
Deprecate old and replaced appframework apis
2014-12-17 11:28:01 +01:00
Bernhard Posselt
d59c4e832f first round of deprecation 2014-12-16 19:50:31 +01:00
Joas Schilling
26100a6dfb Move timezone logic out of server.php 2014-12-16 16:16:22 +01:00
Jörn Friedrich Dreyer
6602d3ac77 Merge pull request #12555 from owncloud/app_specific_search
introduce inApps[] filter for search via ajax query
2014-12-15 16:14:40 +01:00
Olivier Paroz
469fd3b3a3 Olivier Paroz \OCP\AppFramework\Utility\IControllerMethodReflector 2014-12-14 23:54:31 +01:00
Morris Jobke
efb495b09f Merge pull request #12726 from owncloud/add-filter-for-backend-to-rest-index
Add filter for backend to rest index
2014-12-13 08:50:15 +01:00
Vincent Petry
4b57892c4e Merge pull request #12778 from owncloud/searchbytags2
Added searchByTags to view, storage and cache
2014-12-12 14:27:19 +01:00
Joas Schilling
4f92e4a233 Merge pull request #12808 from owncloud/add-special-parameterlist-to-manager
Add special parameterlist to manager
2014-12-12 13:03:26 +01:00
Vincent Petry
15ecb28d50 Make $userId mandatory for searchByTags
$userId is now a mandatory parameter for searchByTags.

Also fixed some places in the code where the argument was missing (Node
API and View)
2014-12-12 11:18:35 +01:00
Vincent Petry
25dde7e93b Added searchByTags to view, storage and cache 2014-12-11 17:38:50 +01:00
Joas Schilling
1b18554aa7 Allow extensions to specify the list of special parameters 2014-12-11 14:56:46 +01:00
Lukas Reschke
d0716d2c7d Use public interface 2014-12-11 12:29:58 +01:00
Vincent Petry
745d8706b9 Add user parameter to tag manager 2014-12-11 12:22:28 +01:00
Lukas Reschke
d84a1f6f3a Add IniGetWrapper to public interface 2014-12-11 00:09:55 +01:00
Jörn Friedrich Dreyer
1d490b559c introduce inApps[] filter for search via ajax query, make file results show up in files app only
use more flexible return type

check array with !empty instead of count
2014-12-10 15:51:59 +01:00
Joas Schilling
bef7392c4c Add type of the variables to the docs 2014-12-10 15:18:06 +01:00
Joas Schilling
fd2599cfc2 Merge pull request #12485 from owncloud/jenkins-12383
New DateTimeFormatter class for dates in other timezones and languages
2014-12-10 14:48:59 +01:00
Lukas Reschke
5dc6406b70 Add filter for 'backend' to user REST route
This adds a "backend" type filter to the index REST route which is a pre-requisite for https://github.com/owncloud/core/issues/12620

For example when calling `index.php/settings/users/users?offset=0&limit=10&gid=&pattern=&backend=OC_User_Database` only users within the backend `OC_User_Database` would be shown. (requires sending a CSRF token as well)

Depends upon https://github.com/owncloud/core/pull/12711
2014-12-10 12:07:34 +01:00
Joas Schilling
67335ccddf Require the interface and return a string instead of private classes 2014-12-10 11:58:56 +01:00
Joas Schilling
4d232e536e Deprecate Util::formatDate()
Make DateTimeFormatter a service and adjust tests that have been inaccurate
2014-12-10 11:58:56 +01:00
Lukas Reschke
5398bbdc00 Merge pull request #12711 from owncloud/add-backend-to-rest-index
Expose backend type via REST API
2014-12-10 11:56:45 +01:00
Morris Jobke
263e008d7b Merge pull request #12695 from owncloud/db-drop-table
Add dropTable to IDBConnection
2014-12-09 18:40:56 +01:00
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
Clark Tomlinson
cb0da1178b Merge pull request #10653 from owncloud/x-forwarded-for
Add support for getting the real client IP behind proxies
2014-08-27 10:32:34 -04:00
Björn Schießle
c35d60f6d8 Merge pull request #9915 from suraia/unsharefromself-source
Allow specifying the item source in unshareFromSelf().
2014-08-27 10:31:35 +02:00
Lukas Reschke
d26a9c3c58 Add some security utilities
This adds some security utilities to core including:
- A library for basic crypto operations (e.g. to encrypt passwords)
- A better library for cryptographic actions which allows you to specify the charset
- A library for secure string comparisions

Remove .htaccess

Remove .htaccess

Fix typo

Add public API

Use timing constant comparision

Remove CBC constant

Adjust code

Remove confusing $this
2014-08-27 00:18:04 +02:00
Lukas Reschke
7acdd018a1 Add support for getting the real client IP behind proxies
Fixes https://github.com/owncloud/core/issues/10624

Fix copy paste fail

Add unittest for comma separated headers

Revert 3rdparty
2014-08-27 00:05:04 +02:00
Lukas Reschke
88c3a4a31a Expose setSystemValue 2014-08-22 15:53:23 +02:00
Morris Jobke
ab6ee6a600 Add doc for \OCP\Files\FileInfo space constants 2014-08-19 16:49:51 +02:00
Morris Jobke
b3b3354809 move to public namespace 2014-08-19 14:05:08 +02:00
Thomas Müller
c08a1e6455 according to PHPDoc this function shall return the entity 2014-08-17 22:27:55 +02:00
Thomas Müller
c1102b1671 Merge pull request #10417 from owncloud/update_deprecation_doc
update deprecation docs
2014-08-14 17:54:23 +02:00
Jörn Friedrich Dreyer
fd798fd982 update deprecation docs 2014-08-14 12:22:34 +02:00
Bjoern Schiessle
d9f35d8c15 we need the recipient as a additional parameter to know for which share the notification was send 2014-08-13 17:02:51 +02:00
Vincent Petry
173059f6d0 Fixed file list sorting
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
2014-08-11 13:28:53 +02:00
Björn Schießle
d35bfc9a4c Merge pull request #9520 from owncloud/theme_urls
Add ability to theme iOS and Android client URLs just like desktop URLs.
2014-08-05 17:53:18 +02:00
scolebrook
2e127d2c5e Add ability to theme iOS and Android client URLs just like desktop URLs. 2014-08-05 13:16:51 +02:00
Bjoern Schiessle
41cca70a63 don't display share permission if resharing was disabled by the admin 2014-08-05 10:57:51 +02:00
Thomas Müller
4eb2b4e1b0 Merge pull request #10051 from owncloud/preview-empty-text
Use svg mimeicons for empty text files
2014-07-31 11:38:29 +02:00
Robin Appelman
4a9b0d5465 Use svg mimeicons for empty text files 2014-07-30 16:31:37 +02:00
Morris Jobke
889088f72d Fix template rendering for 'blank' templates 2014-07-29 16:49:50 +02:00
Björn Schießle
c53b56e313 Merge pull request #9798 from owncloud/ocs_share_api_add_expire_date
[share api] add OCS api call to set expire date for link shares
2014-07-28 17:28:32 +02:00
Michael Kuhn
ecdd04374a Allow specifying the item source in unshareFromSelf(). 2014-07-26 02:00:49 +02:00
Robin Appelman
acafb4a426 Merge pull request #9669 from owncloud/group-public
Add group management to the public api
2014-07-25 17:55:12 +02:00
Bjoern Schiessle
ecc1f92bb6 add OCS api call to set expire date for link shares 2014-07-25 13:38:18 +02:00
Thomas Müller
a8b6cc6a07 - adding default value for $recoveryPassword
- set password correctly in lost password
2014-07-24 12:50:39 +02:00
Joas Schilling
01878153e0 Add language parameter to public API for getL10N()
Fix #9756
2014-07-21 14:50:34 +02:00
Robin Appelman
94fa21d146 Add group management to the public api 2014-07-16 14:25:31 +02:00
Jörn Friedrich Dreyer
b3106c321c use correct IUser in interface 2014-07-15 17:41:44 +02:00
Robin Appelman
51d0bdc90c Expose the user manager in the public server container 2014-07-14 15:10:56 +02:00
Robin Appelman
20c1ce7f47 Add public interfaces for User, UserManager and UserSession 2014-07-14 15:10:51 +02:00
Thomas Müller
8363f3c635 Adding new interface \OCP\Activity\IExtentsion
Adding method getNotificationTypes()
Adding method filterNotificationTypes()
Adding method getDefaultTypes()
Adding method translate() and getTypeIcon()
Adding method getGroupParameter()
Adding method getNavigation()
Adding method getNavigation()
Adding method isFilterValid() and getQueryForFilter()
Adding unit tests for \OC\ActivityManager
2014-07-08 09:04:37 +02:00
Thomas Müller
2327d41b11 Merge pull request #9269 from owncloud/fix_versions_preview
change order of registering api and capabilities to fix file version previews
2014-07-04 15:25:24 +02:00
Vincent Petry
ed29e7d160 Merge pull request #9329 from owncloud/sharing_check_target
don't move a share mount point into a different mount point
2014-07-02 21:01:03 +02:00
Bjoern Schiessle
735eac6c9d add a explicit interface for the home storage 2014-07-01 17:31:33 +02:00
Jörn Friedrich Dreyer
5a588333b2 introduce and use getCurrentConnection() 2014-07-01 16:45:00 +02:00
Robin Appelman
1c43081d38 Detect removed public shares 2014-07-01 14:36:06 +02:00
Robin Appelman
d78a2a9f78 Add StorageNotAvailableException 2014-06-30 15:46:37 +02:00
Vincent Petry
fd8b5680dd Merge pull request #8383 from owncloud/object_storage
Object storage
2014-06-27 16:53:03 +02:00
Jörn Friedrich Dreyer
c112a1d323 move to stream based IObjectStore interface, rearrange & reformat code 2014-06-20 12:27:47 +02:00
Jörn Friedrich Dreyer
f2fe00e972 fix rebase, use 'object::user:<username>' or 'object::store:<storageid> as storage id, by default use container/bucket name for storageid, make storageid configurable, store user only for HomeObjectStoreStorage, change updateObject() to writeObject() 2014-06-18 15:20:26 +02:00
Jörn Friedrich Dreyer
5cae863408 change architecture from inheritance to composition 2014-06-18 12:53:20 +02:00
Vincent Petry
799205488c Prevent loadApps on upgrade
Moved OC::needUpgrade() to OCP\Util::needUpgrade() to make it accessible
form the router.
Moved maintenance + upgrade check to the router.
2014-06-18 11:10:07 +02:00
Bernhard Posselt
93169eca1e also handle lowercase headers 2014-06-11 01:20:09 +02:00
Bernhard Posselt
1002281dae handle http accept headers more gracefully 2014-06-11 00:54:25 +02:00
Vincent Petry
5cebb6fb9b Merge pull request #4553 from owncloud/update_search_classes
Update search classes
2014-06-06 13:24:16 +02:00
Jörn Friedrich Dreyer
aaf0d13171 make search non-static, add ISearch to server container, make legacy a static wrapper for it, move provider and result to public api 2014-06-06 01:17:02 +02:00
Bernhard Posselt
587a8df566 remove controller serializers 2014-06-05 18:00:36 +02:00
Thomas Müller
ec7225da66 remove file locking - code will continue to live in it's own app 2014-06-04 20:11:54 +02:00
ringmaster
54865815f5 Move Lock to private namespace, add interface. Update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster
392a1b6662 Removed unused vars/declarations, update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster
f9dbdb7c5c Add actual locking and log changes necessary for debugging. 2014-06-04 07:55:44 +02:00
ringmaster
dc1e3620d2 Continued flock work. 2014-06-04 07:55:44 +02:00
ringmaster
5365ae416e flock changes. Work in progress. 2014-06-04 07:55:44 +02:00
Morris Jobke
9a67986473 add OCP\Config:deleteSystemValue 2014-06-02 18:31:43 +02:00
Lukas Reschke
c8b5ae675c Fix PHPDoc
- Remove not anymore existing parameters
- Fix typo
2014-06-01 21:46:05 +02:00
Robin Appelman
8c5521fdfc Add $storage->instanceOfStorage to handle instanceof for storage wrappers 2014-05-29 13:45:50 +02:00
Bart Visscher
a51e9a5cfe Merge pull request #8136 from owncloud/contactsmanager-register
Implement the register function of OC\ContactsManager
2014-05-27 22:35:50 +02:00
Bjoern Schiessle
12338e0ef0 allow admin to disable sharing for specific groups of users 2014-05-22 10:43:44 +02:00
Thomas Müller
8749442fec no return on register and unregister 2014-05-19 21:39:19 +02:00
Thomas Müller
bb6fac1102 Merge branch 'master' into contactsmanager-register
Conflicts:
	lib/private/contactsmanager.php
2014-05-19 21:35:13 +02:00
Morris Jobke
dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Thomas Müller
95741f3936 Merge pull request #8435 from owncloud/fix-8322-master
Expose permission via WebDAV
2014-05-19 16:52:03 +02:00
Joas Schilling
ab7ae004f7 Automatically copy the share expiration date when new shares are created
Fix #4823
2014-05-19 01:38:47 +02:00
Björn Schießle
b52cb8f557 Merge pull request #8604 from owncloud/sharing_encforce_password
allow admin to enforce passwords for public link shares
2014-05-16 12:23:01 -04:00
Bjoern Schiessle
b6e14af861 allow admin to enforce passwords for public link shares 2014-05-16 17:41:09 +02:00
Bernhard Posselt
9e36c33104 use fetch method instead of fetchRow because fetchRow is only an owncloud internal alias that exists purely for compability 2014-05-14 01:09:48 +02:00
Bernhard Posselt
512373fadf provide a way to detect the language that is being used (e.g. for clientside javascript language selection 2014-05-14 01:09:48 +02:00
Robin McCorkell
f7e777f7d2 Fix various code errors detected by Scrutinizer
Fixed:
- An error with a misplaced bracket in lib/private/util.php
- An error with an incorrect function being called in lib/public/contacts.php
2014-05-13 19:09:14 +01:00
Robin McCorkell
87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell
a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell
b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell
b653ad164b Replace @returns with @return, in /lib 2014-05-13 19:08:14 +01:00
Thomas Müller
1d18fd4e6d Merge pull request #8482 from owncloud/public-logger
Make logger available in the container
2014-05-12 16:40:58 +02:00
Morris Jobke
6499995474 Merge pull request #8477 from owncloud/better-controllers
Better appframework controllers
2014-05-12 01:07:49 +02:00
Morris Jobke
7a6ff56b13 Merge pull request #8274 from owncloud/appframework-db
Port database layer from appframework to core
2014-05-12 00:12:19 +02:00
Bernhard Posselt
1d45239c65 adjust license headers to new mail address 2014-05-11 17:54:08 +02:00
Bernhard Posselt
cb666c18d6 rename formatter to responder, formatResponse to buildResponse 2014-05-11 17:54:08 +02:00
Bernhard Posselt
80648da431 implement most of the basic stuff that was suggested in #8290 2014-05-11 17:54:08 +02:00
Bernhard Posselt
3af30625ab Make db connection protected 2014-05-11 12:54:44 +02:00
Bernhard Posselt
9a4d204b55 add cors middleware
remove methodannotationreader namespace

fix namespace for server container

fix tests

fail if with cors credentials header is set to true, implement a reusable preflighted cors method in the controller baseclass, make corsmiddleware private and register it for every request

remove uneeded  local in cors middleware registratio

dont uppercase cors to easily use it from routes

fix indention

comment fixes

explicitely set allow credentials header to false

dont depend on better controllers PR, fix that stuff later

split cors methods to be in a seperate controller for exposing apis

remove protected definitions from apicontroller since controller has it
2014-05-09 23:34:41 +02:00
Bernhard Posselt
b4298c68ca - make logger available in the container
- inject logger class into log
- adding PHPDoc comments and fixing typos
2014-05-09 23:26:20 +02:00
Vincent Petry
390549c286 Merge pull request #8221 from owncloud/type-hinting-sharing
Type hinting fixes for sharing
2014-05-08 09:30:50 +02:00
Vincent Petry
4a493c8835 Some expected Sabre exceptions are now logged with DEBUG level 2014-05-07 11:43:50 +02:00
Thomas Müller
c92c577b5e - Introduce isShared() and isMounted() on FileInfo class
- Reuse these methods on determineIcon()
- Generate permission string for the desktop client
- expose {http://owncloud.org/ns}permissions as additional WebDAV property containing the permission string
2014-05-02 17:37:16 +02:00
Bart Visscher
614cc67f88 Correct return type for getFilePath 2014-05-01 18:12:17 +02:00
Bart Visscher
c34659dd89 Better documentation for isValidSource function 2014-05-01 18:11:55 +02:00
Bart Visscher
66b1ad0a9b Merge branch 'master' into type-hinting-sharing
Conflicts:
	apps/files_sharing/lib/share/file.php
	apps/files_sharing/tests/api.php
	lib/private/share/share.php
2014-04-28 17:59:41 +02:00
Bart Visscher
fc9371ae10 Merge branch 'master' into contactsmanager-register
Conflicts:
	lib/private/contactsmanager.php
2014-04-26 10:55:25 +02:00
Bernhard Posselt
5199e4508a dont update entity and dont run an update query if an entity wasnt changed at all 2014-04-23 13:43:17 +02:00
Bjoern Schiessle
c4e0fb75a4 add api to get shares from a specific user 2014-04-23 12:54:24 +02:00
Joas Schilling
704b9e6a0d Merge pull request #8009 from owncloud/feature/add-sharing-target
Add option to getUsersSharingFile() to get the paths for the shared users
2014-04-23 12:49:06 +02:00
Morris Jobke
0ebb4662ec Merge pull request #8281 from owncloud/public-responses
make download and redirectresponse public
2014-04-22 00:08:04 +02:00
Lukas Reschke
e88731a477 Some more PHPDoc fixes 2014-04-21 15:44:54 +02:00
Bernhard Posselt
7e447f4f42 make download and redirectresponse public 2014-04-20 16:12:46 +02:00