From 0ef1c1daa616020e0c65e57e4fd569017c7b85df Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Tue, 12 Nov 2024 10:32:46 -0800 Subject: [PATCH] fix(ExApp): remove deprecated AppAPI features Signed-off-by: Edward Ly --- .../DeployConfigurations.rst | 2 +- .../development_overview/ExAppOverview.rst | 8 --- .../tech_details/ApiScopes.rst | 50 ------------------- .../tech_details/Authentication.rst | 3 +- .../tech_details/Deployment.rst | 5 -- .../tech_details/InstallationFlow.rst | 2 +- .../tech_details/api/fileactionsmenu.rst | 9 +--- .../tech_details/api/other_ocs.rst | 6 +-- .../tech_details/api/routes.rst | 31 ++++++------ .../exapp_development/tech_details/index.rst | 1 - 10 files changed, 23 insertions(+), 94 deletions(-) delete mode 100644 developer_manual/exapp_development/tech_details/ApiScopes.rst diff --git a/admin_manual/exapps_management/DeployConfigurations.rst b/admin_manual/exapps_management/DeployConfigurations.rst index ef436661e..471bccf21 100644 --- a/admin_manual/exapps_management/DeployConfigurations.rst +++ b/admin_manual/exapps_management/DeployConfigurations.rst @@ -300,7 +300,7 @@ where: .. note:: - Starting with AppAPI version ``2.5.0``, the optional additional parameter *OVERRIDE_APP_HOST* can be used to + The optional additional parameter *OVERRIDE_APP_HOST* can be used to override the host that will be used for ExApp binding. It can be ``0.0.0.0`` in some specific configurations, when VPN is used diff --git a/developer_manual/exapp_development/development_overview/ExAppOverview.rst b/developer_manual/exapp_development/development_overview/ExAppOverview.rst index 0306ec77b..e2b16e52c 100644 --- a/developer_manual/exapp_development/development_overview/ExAppOverview.rst +++ b/developer_manual/exapp_development/development_overview/ExAppOverview.rst @@ -40,20 +40,12 @@ It should contain the following fields: nextcloud/skeleton latest - // deprecated and removed since AppAPI 3.2.0 - FILES - AI_PROVIDERS - ... - - false // deprecated since AppAPI 3.0.0 - **docker-install**: contains the Docker image information for the ExApp. - **registry**: the Docker registry where the image is stored. - **image**: the Docker image name. - **image-tag**: the Docker image tag (version tag). -- **scopes**: the list of the Nextcloud scopes that the ExApp requires (see :ref:`list of scopes `). -- **system**: (deprecated since AppAPI 3.0.0) a boolean value that indicates whether the ExApp is a system app or not. Backend diff --git a/developer_manual/exapp_development/tech_details/ApiScopes.rst b/developer_manual/exapp_development/tech_details/ApiScopes.rst deleted file mode 100644 index 0ca1b7c35..000000000 --- a/developer_manual/exapp_development/tech_details/ApiScopes.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _api_scopes: - -Api Scopes -========== - -.. warning:: - - ApiScopes are deprecated and removed since AppAPI 3.2.0. - -AppAPI design's focus on simplicity and necessity highlights the benefits of defining API scopes. -which simplify the development and integration of applications into the Nextcloud ecosystem. - -With the elimination of optional API scopes, the configuration process during installation becomes more streamlined. -Now, the Nextcloud administrator only needs to focus on the essential API groups, -making the application's setup and permissions handling more efficient and less prone to errors. - -The **info.xml** file continues to play a crucial role, listing all the `required` API groups an -application needs to function correctly. -This not only simplifies version updates, allowing for the seamless introduction of -new API groups or the discontinuation of obsolete ones, but also enhances the overall security and reliability -of the application by ensuring it only has access to necessary functionalities. - -Supported API Groups include: - -* ``2`` SYSTEM -* ``10`` FILES -* ``11`` FILES_SHARING -* ``30`` USER_INFO -* ``31`` USER_STATUS -* ``32`` NOTIFICATIONS -* ``33`` WEATHER_STATUS -* ``50`` TALK -* ``60`` TALK_BOT -* ``61`` AI_PROVIDERS -* ``62`` EVENTS_LISTENER -* ``63`` OCC_COMMAND -* ``110`` ACTIVITIES -* ``120`` NOTES -* ``200`` TEXT_PROCESSING -* ``210`` MACHINE_TRANSLATION -* ``9999`` ALL - -These groups, represented by intuitive names, ensure that applications have -tailored access to the functionalities they need, enhancing performance and user experience. -As Nextcloud evolves, this list of API groups will continue to grow, offering developers a wide array of tools -to create innovative and efficient applications. - -The streamlined approach to API scopes not only simplifies the application development process -but also aligns with best practices in software design, emphasizing clarity, security, and efficiency. -This refinement in the handling of API scopes reflects Nextcloud's commitment to providing a robust and developer-friendly platform. diff --git a/developer_manual/exapp_development/tech_details/Authentication.rst b/developer_manual/exapp_development/tech_details/Authentication.rst index 6f54241f9..1dc5c2f7d 100644 --- a/developer_manual/exapp_development/tech_details/Authentication.rst +++ b/developer_manual/exapp_development/tech_details/Authentication.rst @@ -78,12 +78,11 @@ In your API controllers, you can use it as a PHP attribute. AppAPI session keys ^^^^^^^^^^^^^^^^^^^ -After successful authentication AppAPI sets `app_api` session key to ``true``. +After successful authentication, AppAPI sets `app_api` session key to ``true``. .. code-block:: php $this->session->set('app_api', true); - $this->session->set('app_api_system', true); // deprecated since AppAPI 3.0.0 .. note:: diff --git a/developer_manual/exapp_development/tech_details/Deployment.rst b/developer_manual/exapp_development/tech_details/Deployment.rst index 93ff67cd5..1d38fb546 100644 --- a/developer_manual/exapp_development/tech_details/Deployment.rst +++ b/developer_manual/exapp_development/tech_details/Deployment.rst @@ -147,10 +147,5 @@ It has the same structure as other Nextcloud appinfo/info.xml files, but with so nextcloud/talk_bot latest - // deprecated since AppAPI 3.2.0 - TALK - TALK_BOT - - 0 // deprecated since AppAPI 3.0.0 ... diff --git a/developer_manual/exapp_development/tech_details/InstallationFlow.rst b/developer_manual/exapp_development/tech_details/InstallationFlow.rst index cdf8bac71..22e70f43c 100644 --- a/developer_manual/exapp_development/tech_details/InstallationFlow.rst +++ b/developer_manual/exapp_development/tech_details/InstallationFlow.rst @@ -6,7 +6,7 @@ App Installation Flow Image Pulling (Docker) ---------------------- -AppAPI **2.5.0+** will always first try to pull a docker image with a ``suffix`` equal to value of *computeDevice*. +AppAPI will first try to pull the Docker image whose ``suffix`` is equal to the value of *computeDevice*. The following values are available for ``computeDevice``: ``cpu``, ``cuda``, or ``rocm``. diff --git a/developer_manual/exapp_development/tech_details/api/fileactionsmenu.rst b/developer_manual/exapp_development/tech_details/api/fileactionsmenu.rst index cf1894924..9c9b98c69 100644 --- a/developer_manual/exapp_development/tech_details/api/fileactionsmenu.rst +++ b/developer_manual/exapp_development/tech_details/api/fileactionsmenu.rst @@ -14,14 +14,7 @@ AppAPI takes responsibility to register FileActionsMenu, ExApps needs only to re Register ^^^^^^^^ -.. note:: - - With AppAPI 2.6.0 there is a new v2 OCS endpoint with redirect to ExApp UI support: - OCS endpoint: ``POST /apps/app_api/api/v2/ui/files-actions-menu``. - Old v1 is marked as deprecated. - -OCS endpoint: ``POST /apps/app_api/api/v1/ui/files-actions-menu`` - +OCS endpoint: ``POST /apps/app_api/api/v2/ui/files-actions-menu`` Params ****** diff --git a/developer_manual/exapp_development/tech_details/api/other_ocs.rst b/developer_manual/exapp_development/tech_details/api/other_ocs.rst index 23773d4a6..44b752b5e 100644 --- a/developer_manual/exapp_development/tech_details/api/other_ocs.rst +++ b/developer_manual/exapp_development/tech_details/api/other_ocs.rst @@ -1,12 +1,12 @@ Other OCS APIs ============== -With AppAPI authentication it is possible for ExApps to use any other OCS APIs, that doesn't require OCP implementation: +With AppAPI authentication, it is possible for ExApps to use any other OCS APIs that don't require OCP implementation: .. note:: - To access these APIs they have to be supported by AppAPI (see :ref:`api_scopes`), - and ExApp have to require granted access (in ``info.xml``) to them accordingly. + To access these APIs, they have to be supported by AppAPI, + and the ExApp must grant access to them (in ``info.xml``) accordingly. 1. Calendar 2. Contacts diff --git a/developer_manual/exapp_development/tech_details/api/routes.rst b/developer_manual/exapp_development/tech_details/api/routes.rst index afca4f2ae..5f8b406ce 100644 --- a/developer_manual/exapp_development/tech_details/api/routes.rst +++ b/developer_manual/exapp_development/tech_details/api/routes.rst @@ -4,11 +4,7 @@ Routes ====== -Since AppAPI 3.0.0 ExApps have to declare their routes allowed to be accessed via the AppAPI ExApp proxy. - -.. note:: - - This routes check applied only for ExApp proxy (``/apps/app_api/proxy/*``). +All ExApps must declare the routes that are allowed to be accessed via the AppAPI ExApp proxy (``/apps/app_api/proxy/*``). Register @@ -22,15 +18,19 @@ Example .. code-block:: - - - .* - GET,POST,PUT,DELETE - USER - [] - [401, 500] - - + ... + + + + .* + GET,POST,PUT,DELETE + USER + [] + [401, 500] + + + + ... where the fields are: @@ -44,4 +44,5 @@ where the fields are: Unregister ^^^^^^^^^^ -ExApp routes are unregistered automatically when the ExApp is uninstalling, or during the ExApp update before registering the new routes. +ExApp routes are unregistered automatically when the ExApp is uninstalled, +and new routes are re-registered when the ExApp is updated. diff --git a/developer_manual/exapp_development/tech_details/index.rst b/developer_manual/exapp_development/tech_details/index.rst index 7c226974f..46ea3d9bd 100644 --- a/developer_manual/exapp_development/tech_details/index.rst +++ b/developer_manual/exapp_development/tech_details/index.rst @@ -5,7 +5,6 @@ Technical details :maxdepth: 2 InstallationFlow - ApiScopes Deployment Authentication Translations