[WIP] Blacklist command #14

草稿
CptainObvious 請求將 1 次程式碼提交從 CptainObvious/occweb:master 合併至 master
First-time contributor

Implement a blacklist with command that we want to prevent being run from occweb like maintenance mode:on

Return a 403 forbidden with a json response

{ "error": "command blacklisted"} ```


The error message is formatted for term but nextcloud is escaping color code \u001b -> \\u001b in the response

Will see to move the formatting of the error in the js 
Implement a blacklist with command that we want to prevent being run from occweb like ```maintenance mode:on``` Return a 403 forbidden with a json response ``` { "error": "command blacklisted"} ``` The error message is formatted for term but nextcloud is escaping color code \u001b -> \\u001b in the response Will see to move the formatting of the error in the js
擁有者

The blacklisted command is not correct (see occ docs): maintenance:mode --on.
I would change the error message to something more meaningful as "command not supported in occweb" with maybe a link to the docs.
In some cases, I think it can be useful in the future to be able to bypass the blacklist with --force and -f or a custom flag if not available.

The [blacklisted command](https://git.adphi.net/adphi/occweb/pulls/14/files#diff-c62a13695dd9007bbfeca860cb9f55cf0ab59beR30) is not correct (see [occ docs](https://docs.nextcloud.com/server/18/admin_manual/configuration_server/occ_command.html#maintenance-commands)): `maintenance:mode --on`. I would change the [error message](https://git.adphi.net/adphi/occweb/pulls/14/files#diff-c62a13695dd9007bbfeca860cb9f55cf0ab59beR75) to something more meaningful as "command not supported in occweb" with maybe a link to the docs. In some cases, I think it can be useful in the future to be able to bypass the blacklist with `--force` and `-f` or a custom flag if not available.
此合併請求被標記為還在進行中 (WIP)。
相對於基底分支,此分支已過時
您也可以查看命令列指南

第一步:

在您的儲存庫中切換到新分支並測試變更。
git checkout -b CptainObvious-master master
git pull master

第二步:

合併變更並更新到 Gitea。
git checkout master
git merge --no-ff CptainObvious-master
git push origin master
登入 才能加入這對話。
沒有審核者
未選擇里程碑
沒有負責人
2 參與者
通知
截止日期
截止日期無效或超出範圍,請使用「yyyy-mm-dd」的格式。

未設定截止日期。

先決條件

未設定先決條件。

參考: adphi/occweb#14
No description provided.