1717use OCP \AppFramework \Http \Attribute \PublicPage ;
1818use OCP \AppFramework \Http \DataResponse ;
1919use OCP \AppFramework \OCSController ;
20- use OCP \IConfig ;
2120use OCP \IRequest ;
2221
2322class OCSSettingsController extends OCSController {
@@ -26,7 +25,6 @@ class OCSSettingsController extends OCSController {
2625 public function __construct (
2726 IRequest $ request ,
2827 private readonly SettingsService $ settingsService ,
29- private readonly IConfig $ config ,
3028 ) {
3129 parent ::__construct (Application::APP_ID , $ request );
3230
@@ -37,10 +35,6 @@ public function __construct(
3735 #[PublicPage]
3836 #[AppAPIAuth]
3937 public function registerForm (array $ formScheme ): DataResponse {
40- $ ncVersion = $ this ->config ->getSystemValueString ('version ' , '0.0.0 ' );
41- if (version_compare ($ ncVersion , '29.0 ' , '< ' )) {
42- return new DataResponse ([], Http::STATUS_NOT_IMPLEMENTED );
43- }
4438 $ settingsForm = $ this ->settingsService ->registerForm (
4539 $ this ->request ->getHeader ('EX-APP-ID ' ), $ formScheme );
4640 if ($ settingsForm === null ) {
@@ -53,10 +47,6 @@ public function registerForm(array $formScheme): DataResponse {
5347 #[PublicPage]
5448 #[AppAPIAuth]
5549 public function unregisterForm (string $ formId ): DataResponse {
56- $ ncVersion = $ this ->config ->getSystemValueString ('version ' , '0.0.0 ' );
57- if (version_compare ($ ncVersion , '29.0 ' , '< ' )) {
58- return new DataResponse ([], Http::STATUS_NOT_IMPLEMENTED );
59- }
6050 $ unregistered = $ this ->settingsService ->unregisterForm (
6151 $ this ->request ->getHeader ('EX-APP-ID ' ), $ formId );
6252 if ($ unregistered === null ) {
@@ -69,10 +59,6 @@ public function unregisterForm(string $formId): DataResponse {
6959 #[PublicPage]
7060 #[NoCSRFRequired]
7161 public function getForm (string $ formId ): DataResponse {
72- $ ncVersion = $ this ->config ->getSystemValueString ('version ' , '0.0.0 ' );
73- if (version_compare ($ ncVersion , '29.0 ' , '< ' )) {
74- return new DataResponse ([], Http::STATUS_NOT_IMPLEMENTED );
75- }
7662 $ result = $ this ->settingsService ->getForm (
7763 $ this ->request ->getHeader ('EX-APP-ID ' ), $ formId );
7864 if (!$ result ) {
0 commit comments