Repository navigation
Capabilities manager - #15093
Capabilities manager#15093
Conversation
|
Capabilitie -> Capability (found in multiple places) |
Thanks, fixed. |
There was a problem hiding this comment.
Ah ok, got it... I mixed up CapabilitiesController and CapabilitiesManager.
There was a problem hiding this comment.
To register the capabilities with the manager. Else how would it know where to look?
There was a problem hiding this comment.
remove the use, you dont use it anymore
|
Great stuff! You might want to adapt the other apps next (files_sharing, files_versions, files_trashbin) to also use this. |
|
@PVince81 thanks. Yeah those are on my list to adapt. But wanted feedback first. I also plan to print a warning to the log if somebody tries to register a capabilities route instead of the capabilities manager. |
|
Please rebase. Is this ready for test/review ? If yes, please remove the WIP 😄 |
|
I guess this is not yet compatible with the old OCS URLs, isn't it ? |
|
(I haven't tested yet) |
There was a problem hiding this comment.
@PVince81 that is actually what happens here. since we do yet have OCS routes in the appframework.
There was a problem hiding this comment.
Move the existing capa... also in a Class:
'pollinterval' => OC_Config::getValue('pollinterval', 60)
so people will stop hard coding it
|
|
Jenkins is happy #15278 |
|
cc @LukasReschke @schiesbn |
|
@nickvergessen thanks! Fixed your comments. |
There was a problem hiding this comment.
Just throw \InvalidArgumentException
http://php.net/manual/de/class.invalidargumentexception.php
throw new \InvalidArgumentException('The given Capability does not implement the ICapability interface');There was a problem hiding this comment.
makes more sense. thanks.
Fixed
|
Hopefully the final jenkins PR at #15093 |
|
That bot isn't easy to satisfy, is it ;-) |
|
Jenkins is happy #15093 |
|
Call for (final) reviews: @Raydiation @PVince81 @DeepDiver1975 @LukasReschke @MorrisJobke @nickvergessen |
* This should allow the capabilities to be intergrated into the appframework * Unit tests * Throw exception if closure does not return ICapability instance
* Files * Files_Sharing * Files_Trashbin * Files_Versions
|
A new inspection was created. |
|
@owncloud-bot retest this please |
Looks good to me 👍 |
|
@Raydiation can I assume your 👍 is still valid? |
|
yes |


Implementation of proposal in #14805
The first commit adds the capabilities manager. There now is a capabilities manager where apps can register them self. The capabilities are then all collected in 1 place by iterating over all the apps that have registered a capabilities manager.
The second commit moves the files app to the shiny new capabilities manager.
Comments and suggestions are very welcome. As this would help to get #13964 in. Which would greatly improve the client UX.
Unit tests will of course follow once I have addressed the comments.
CC: @DeepDiver1975 @PVince81 @Raydiation @LukasReschke