Files sidebar: tag creation error ignores the "restrict to admins" setting
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
163~171 行目のエラー処理付近にある apps/systemtags/src/components/SystemTags.vue を読み、Issue で正しい状態参照を使っているとされる SystemTagPicker.vue と比較してください。制限チェックを更新し、両方のエラー分岐で読み込み状態がリセットされるようにしてください。エラーメッセージと読み込み状態のテストを追加し、関連する systemtags コンポーネントのテストを実行してください。
索引モデルが issue の本文から書いたものです。
説明
Bug description
When creating a tag in the Files sidebar fails, SystemTags.vue decides on the error message by reading the creation restriction from the initial state of the settings app:
In Files this state is provided by the systemtags app (LoadAdditionalScriptsListener / BeforeTemplateRenderedListener), the settings one only exists on the admin server settings page. So the value is always false here and users always get the generic "Failed to create tag" instead of "System admin disabled tag creation. You can only use existing ones." In addition, the early return in that branch skips loading.value = false, so once the app id is fixed the component would stay in the loading state after this error.
Steps to reproduce
Found by code reading.
- As admin, restrict tag creation to admins.
- As a regular user, try to create a new tag from the Files sidebar.
- "Failed to create tag" is shown.
Expected behavior
The state is read via loadState('systemtags', 'restrictSystemTagsCreationToAdmin', false) (as SystemTagPicker.vue does), the loading state is reset in both branches, and this is covered by a test.
Nextcloud version
master
- 主要言語
- PHP
- スター
- 37.7k
- フォーク
- 5.4k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 585
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/server のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: federation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: files feature: previews and thumbnails
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: dashboard
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
1. to develop bug feature: sharing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
nextcloud/server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
nhrrob/nhrrob-secure#35 ·
-
area/tests type/bug when/soon
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信