aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/dependencyinjection
Commit message (Collapse)AuthorAgeFilesLines
* Move \OC\AppFramework to PSR-4Roeland Jago Douma2016-04-221-461/+0
| | | | * Also moved the autoloader setup a bit up since we need it in initpaths
* Add activities for commentsJoas Schilling2016-02-051-0/+4
|
* Add activities when a tag is (un-)assignedJoas Schilling2016-02-021-0/+4
|
* Add public API to give developers the possibility to adjust the global CSP ↵Lukas Reschke2016-01-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defaults Allows to inject something into the default content policy. This is for example useful when you're injecting Javascript code into a view belonging to another controller and cannot modify its Content-Security-Policy itself. Note that the adjustment is only applied to applications that use AppFramework controllers. To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. To test this add something like the following into an `app.php` of any enabled app: ``` $manager = \OC::$server->getContentSecurityPolicyManager(); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFrameDomain('asdf'); $policy->addAllowedScriptDomain('yolo.com'); $policy->allowInlineScript(false); $manager->addDefaultPolicy($policy); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFontDomain('yolo.com'); $manager->addDefaultPolicy($policy); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFrameDomain('banana.com'); $manager->addDefaultPolicy($policy); ``` If you now open the files app the policy should be: ``` Content-Security-Policy:default-src 'none';script-src yolo.com 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src yolo.com 'self';connect-src 'self';media-src 'self';frame-src asdf banana.com 'self' ```
* [Share 2.0] Add getShareManager to OCP\IServerContainerRoeland Jago Douma2016-01-271-0/+4
|
* Merge pull request #21719 from owncloud/move-notification-api-to-ocpThomas Müller2016-01-221-0/+4
|\ | | | | Move the notification API to public namespace
| * Allow automatic injection of the ManagerJoas Schilling2016-01-221-0/+4
| |
* | Introduce CredentialsManager for storage of credentials in DBRobin McCorkell2016-01-181-0/+4
|/ | | | | | | | | | | 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.
* Happy new year!Thomas Müller2016-01-121-2/+3
|
* Add 'OCP\Files\IMimeTypeDetector' to DI containerRoeland Jago Douma2016-01-071-0/+4
| | | | * Added test to server container as well
* Register app containers in the OC containerJoas Schilling2015-12-181-0/+4
|
* Allow DI for OCP\Files\IMimeTypeDetectorJoas Schilling2015-12-011-0/+4
|
* Allow DI the system tag stuff without Application classJoas Schilling2015-11-301-0/+8
|
* Add full interface of server container as aliasMorris Jobke2015-11-261-0/+1
|
* Move index.php from files to AppFrameworkLukas Reschke2015-11-161-0/+4
| | | | | 1. Allows it to use the more secure CSP rules of the AppFramework. 2. Adds some unit tests.
* Use getHttpProtocol instead of $_SERVERLukas Reschke2015-10-301-5/+4
|
* Update license headersLukas Reschke2015-10-261-1/+1
|
* Provide IAppContainer as dependency injectionMorris Jobke2015-10-201-0/+4
|
* Use `/` if installed in main folderLukas Reschke2015-10-061-1/+1
| | | | | | Otherwise an empty string is used indicating the cookie is only valid for those resources. This can lead to eunexpected behaviour. Fixes https://github.com/owncloud/core/issues/19196
* update licence headers via scriptMorris Jobke2015-10-051-0/+1
|
* Merge pull request #17852 from owncloud/register-alias-factoryRobin McCorkell2015-08-111-0/+1
|\ | | | | Add test for factories
| * add test for factoriesBernhard Posselt2015-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | use ref for factory test use a factory for registerAlias Ensure we construct SimpleContainer Use single instance of DIContainer in routing tests
* | Use DIRoeland Jago Douma2015-08-101-0/+14
| | | | | | | | | | | | | | | | * Register OCP\Capability\IManager at DIContainer * Add register capabilities to appframework * Register capabilities in DI way * Make unit test pass again * Remove CapabiltiesManager from OCP
* | Add \OCP\ISession to AppFrameworkRobin McCorkell2015-08-071-0/+4
|/
* add registerAlias method to shorcut interface registrationBernhard Posselt2015-07-181-39/+11
| | | | | | | | remove unused import add since tag fix typo
* disallow cookie auth for cors requestsBernhard Posselt2015-05-221-2/+3
| | | | | | | | | | | | | | | | testing ... fixes fix test add php doc fix small mistake add another phpdoc remove not working cors annotations from files app
* Scrutinizer Auto-FixesScrutinizer Auto-Fixer2015-05-191-1/+0
| | | | This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
* add aliases to pascal case constructor paramters to make it possible to auto ↵Bernhard Posselt2015-04-291-0/+11
| | | | assemble controllers
* Update license headersJenkins for ownCloud2015-03-261-13/+17
|
* AppFramework StreamResponseBernhard Posselt2015-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | First stab at the StreamResponse, see #12988 The idea is to use an interface ICallbackResponse (I'm not 100% happy with the name yet, suggestions?) that allow the response to output things in its own way, for instance stream the file using readfile Unittests are atm lacking, plan is to check if a mock of ICallbackResponse will be used by calling its callback (also unhappy with this name) method Usage is: $response = new StreamResponse('path/to/file'); rename io to output, add additional methods and handle error and not modified cases when using StreamResponse fix indention and uppercasing, also handle forbidden cases fix indention fix indention no forbidden, figuring out if a file is really readable is too complicated to get to work across OSes and streams remove useless import remove useless import fix intendation
* Revert "Updating license headers"Morris Jobke2015-02-261-17/+15
| | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* Updating license headersJenkins for ownCloud2015-02-231-15/+17
|
* Use proper namespaceLukas Reschke2015-01-271-1/+1
| | | | | | IAppManager lives in OCP\App and not in OCP. Fixes https://github.com/owncloud/core/issues/13710
* get rid of log warning when using servercontainerBernhard Posselt2015-01-221-39/+36
|
* always set url parameters when they are available in the app dispatchBernhard Posselt2015-01-151-1/+0
| | | | | | prefer url parameters passed into the main method. If they are not present, use the containers urlParameters add space
* degraded logging policy for server container in AppFrameworkMorris Jobke2015-01-061-2/+2
|
* Use info instead of warning log levelLukas Reschke2015-01-051-2/+2
| | | | | | Otherwise the log is flooded as can be seen at https://github.com/owncloud/core/issues/13106 Fixes https://github.com/owncloud/core/issues/13106
* Intelligent containerBernhard Posselt2014-12-231-6/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* add isAdmin and isInGroup methods for the group managerBernhard Posselt2014-12-171-2/+1
|
* add a isLoggedIn method to the usersession and deprecate the isLoggedIn ↵Bernhard Posselt2014-12-171-0/+1
| | | | method on the api
* first round of deprecationBernhard Posselt2014-12-161-0/+4
|
* Update Pimple to V3.0Thomas Müller2014-11-031-10/+10
|
* introduce SessionMiddleWare to control session handling via an annotationThomas Müller2014-10-221-1/+12
|
* kill OC::$sessionJörn Friedrich Dreyer2014-08-291-1/+1
| | | | | | | | | | | | maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession restore order os OC::$session and OC::$CLI remove unneded initialization of dummy session write back session when $useCustomSession is true log warning when deprecated app is used
* fix 8757, get rid of service locator antipatternBernhard Posselt2014-05-281-5/+10
|
* Fix all PHPDoc types and variable names, in /libRobin McCorkell2014-05-131-2/+2
|
* use new controllermethodreflector for corsmiddlewareBernhard Posselt2014-05-111-1/+4
|
* adjust license headers to new mail addressBernhard Posselt2014-05-111-1/+1
|
* add request to dispatcher classBernhard Posselt2014-05-111-1/+2
|
* implement most of the basic stuff that was suggested in #8290Bernhard Posselt2014-05-111-2/+14
|