Skip to content

Commit 000819d

Browse files
authored
dropped "system" flag for ExApps (#271)
We are making ExApps more like usual PHP Apps for Nextcloud. Now any ExApp is allowed to impersonate any user, no need "system" flag for this. Reference: nextcloud/app_api#323 Signed-off-by: Alexander Piskun <[email protected]>
1 parent 4f2bbf6 commit 000819d

File tree

19 files changed

+44
-68
lines changed

19 files changed

+44
-68
lines changed

docs/NextcloudApp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ After launching your application, execute the following command in the Nextcloud
134134
.. code-block:: shell
135135
136136
php occ app_api:app:register YOUR_APP_ID manual_install --json-info \
137-
"{\"id\":\"YOUR_APP_ID\",\"name\":\"YOUR_APP_DISPLAY_NAME\",\"daemon_config_name\":\"manual_install\",\"version\":\"YOU_APP_VERSION\",\"secret\":\"YOUR_APP_SECRET\",\"scopes\":[\"ALL\"],\"port\":SELECTED_PORT,\"system\":0}" \
137+
"{\"id\":\"YOUR_APP_ID\",\"name\":\"YOUR_APP_DISPLAY_NAME\",\"daemon_config_name\":\"manual_install\",\"version\":\"YOU_APP_VERSION\",\"secret\":\"YOUR_APP_SECRET\",\"scopes\":[\"ALL\"],\"port\":SELECTED_PORT}" \
138138
--force-scopes --wait-finish
139139
140140
You can see how **nc_py_api** registers in ``scripts/dev_register.sh``.

docs/NextcloudSysApp.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Have a great time with Python and Nextcloud!
3333
NextcloudApp
3434
NextcloudTalkBot
3535
NextcloudTalkBotTransformers
36-
NextcloudSysApp
3736
NextcloudUiApp
3837
Options
3938
reference/index.rst

examples/as_app/talk_bot/Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ help:
1010
@echo " build-push build image and upload to ghcr.io"
1111
@echo " "
1212
@echo " run install TalkBot for Nextcloud Last"
13-
@echo " run27 install TalkBot for Nextcloud 27"
13+
@echo " run28 install TalkBot for Nextcloud 28"
1414
@echo " "
1515
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
1616
@echo " First run 'TalkBot' and then 'make registerXX', after that you can use/debug/develop it and easy test."
1717
@echo " "
1818
@echo " register perform registration of running 'TalkBot' into the 'manual_install' deploy daemon."
19-
@echo " register27 perform registration of running 'TalkBot' into the 'manual_install' deploy daemon."
19+
@echo " register28 perform registration of running 'TalkBot' into the 'manual_install' deploy daemon."
2020

2121
.PHONY: build-push
2222
build-push:
@@ -29,22 +29,22 @@ run:
2929
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot --force-scopes \
3030
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot/appinfo/info.xml
3131

32-
.PHONY: run27
33-
run27:
34-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
35-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register talk_bot --force-scopes \
32+
.PHONY: run28
33+
run28:
34+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
35+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot --force-scopes \
3636
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot/appinfo/info.xml
3737

3838
.PHONY: register
3939
register:
4040
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
4141
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot manual_install --json-info \
42-
"{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"],\"system\":0}" \
42+
"{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
4343
--force-scopes --wait-finish
4444

45-
.PHONY: register27
46-
register27:
47-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister talk_bot --force || true
48-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register talk_bot manual_install --json-info \
49-
"{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"],\"system\":0}" \
45+
.PHONY: register28
46+
register28:
47+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot --force || true
48+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot manual_install --json-info \
49+
"{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
5050
--force-scopes --wait-finish

examples/as_app/talk_bot/appinfo/info.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<bugs>https://github.com/cloud-py-api/nc_py_api/issues</bugs>
1717
<repository type="git">https://github.com/cloud-py-api/nc_py_api</repository>
1818
<dependencies>
19-
<nextcloud min-version="27" max-version="29"/>
19+
<nextcloud min-version="28" max-version="30"/>
2020
</dependencies>
2121
<external-app>
2222
<docker-install>
@@ -28,6 +28,5 @@
2828
<value>TALK</value>
2929
<value>TALK_BOT</value>
3030
</scopes>
31-
<system>false</system>
3231
</external-app>
3332
</info>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nc_py_api[app]>=0.10.0
1+
nc_py_api[app]>=0.14.0

examples/as_app/talk_bot_ai/Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ help:
1010
@echo " build-push build image and upload to ghcr.io"
1111
@echo " "
1212
@echo " run install TalkBotAI for Nextcloud Last"
13-
@echo " run27 install TalkBotAI for Nextcloud 27"
13+
@echo " run28 install TalkBotAI for Nextcloud 28"
1414
@echo " "
1515
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
1616
@echo " First run 'TalkBotAI' and then 'make registerXX', after that you can use/debug/develop it and easy test."
1717
@echo " "
1818
@echo " register perform registration of running 'TalkBotAI' into the 'manual_install' deploy daemon."
19-
@echo " register27 perform registration of running 'TalkBotAI' into the 'manual_install' deploy daemon."
19+
@echo " register28 perform registration of running 'TalkBotAI' into the 'manual_install' deploy daemon."
2020

2121
.PHONY: build-push
2222
build-push:
@@ -29,22 +29,22 @@ run:
2929
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot_ai --force-scopes \
3030
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot_ai/appinfo/info.xml
3131

32-
.PHONY: run27
33-
run27:
34-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister talk_bot_ai --silent --force || true
35-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register talk_bot_ai --force-scopes \
32+
.PHONY: run28
33+
run28:
34+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot_ai --silent --force || true
35+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot_ai --force-scopes \
3636
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot_ai/appinfo/info.xml
3737

3838
.PHONY: register
3939
register:
4040
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister talk_bot_ai --silent --force || true
4141
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot_ai manual_install --json-info \
42-
"{\"id\":\"talk_bot_ai\",\"name\":\"TalkBotAI\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9034,\"scopes\":[\"TALK\", \"TALK_BOT\"],\"system\":0}" \
42+
"{\"id\":\"talk_bot_ai\",\"name\":\"TalkBotAI\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9034,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
4343
--force-scopes --wait-finish
4444

45-
.PHONY: register27
46-
register27:
47-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister talk_bot_ai --silent --force || true
48-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register talk_bot_ai manual_install --json-info \
49-
"{\"id\":\"talk_bot_ai\",\"name\":\"TalkBotAI\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9034,\"scopes\":[\"TALK\", \"TALK_BOT\"],\"system\":0}" \
45+
.PHONY: register28
46+
register28:
47+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot_ai --silent --force || true
48+
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot_ai manual_install --json-info \
49+
"{\"id\":\"talk_bot_ai\",\"name\":\"TalkBotAI\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9034,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
5050
--force-scopes --wait-finish

examples/as_app/talk_bot_ai/appinfo/info.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<bugs>https://github.com/cloud-py-api/nc_py_api/issues</bugs>
1717
<repository type="git">https://github.com/cloud-py-api/nc_py_api</repository>
1818
<dependencies>
19-
<nextcloud min-version="27" max-version="29"/>
19+
<nextcloud min-version="28" max-version="30"/>
2020
</dependencies>
2121
<external-app>
2222
<docker-install>
@@ -28,6 +28,5 @@
2828
<value>TALK</value>
2929
<value>TALK_BOT</value>
3030
</scopes>
31-
<system>false</system>
3231
</external-app>
3332
</info>

examples/as_app/talk_bot_ai/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
nc_py_api[app]>=0.10.0
1+
nc_py_api[app]>=0.14.0
22
transformers>=4.33
33
torch
44
torchvision

examples/as_app/to_gif/Makefile

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ help:
99
@echo " "
1010
@echo " build-push build image and upload to ghcr.io"
1111
@echo " "
12-
@echo " run27 install ToGif for Nextcloud 27"
1312
@echo " run28 install ToGif for Nextcloud 28"
1413
@echo " run install ToGif for Nextcloud Last"
1514
@echo " "
1615
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
1716
@echo " First run 'ToGif' and then 'make registerXX', after that you can use/debug/develop it and easy test."
1817
@echo " "
19-
@echo " register27 perform registration of running 'to_gif' into the 'manual_install' deploy daemon."
2018
@echo " register28 perform registration of running 'to_gif' into the 'manual_install' deploy daemon."
2119
@echo " register perform registration of running 'to_gif' into the 'manual_install' deploy daemon."
2220

@@ -25,12 +23,6 @@ build-push:
2523
docker login ghcr.io
2624
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/to_gif:latest .
2725

28-
.PHONY: run27
29-
run27:
30-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true
31-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register to_gif --force-scopes \
32-
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/to_gif/appinfo/info.xml
33-
3426
.PHONY: run28
3527
run28:
3628
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true
@@ -43,23 +35,16 @@ run:
4335
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register to_gif --force-scopes \
4436
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/to_gif/appinfo/info.xml
4537

46-
.PHONY: register27
47-
register27:
48-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true
49-
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register to_gif manual_install --json-info \
50-
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"],\"system\":0}" \
51-
--force-scopes --wait-finish
52-
5338
.PHONY: register28
5439
register28:
5540
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true
5641
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register to_gif manual_install --json-info \
57-
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"],\"system\":0}" \
42+
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"]}" \
5843
--force-scopes --wait-finish
5944

6045
.PHONY: register
6146
register:
6247
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true
6348
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register to_gif manual_install --json-info \
64-
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"],\"system\":0}" \
49+
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"]}" \
6550
--force-scopes --wait-finish

0 commit comments

Comments
 (0)