fix #4183 【コンテンツ】コンテンツ管理でコンテンツを追加したタイミングではそのコンテンツに対する権限チェックが動作していない件を修正#4427
Open
kaburk wants to merge 1 commit into
Open
fix #4183 【コンテンツ】コンテンツ管理でコンテンツを追加したタイミングではそのコンテンツに対する権限チェックが動作していない件を修正#4427kaburk wants to merge 1 commit into
kaburk wants to merge 1 commit into
Conversation
…ックが動作していない件を修正
Contributor
There was a problem hiding this comment.
Pull request overview
コンテンツ管理(ツリー)でコンテンツを追加した直後に、追加したノードに対する権限(編集/管理/削除)チェックが反映されず、メニュー操作が不適切に有効化される問題(#4183)を修正するPRです。サーバ側で権限状態を設定値として保持し、クライアント側で動的生成ノードへ反映することで一貫した権限制御に寄せています。
Changes:
BcContentsHelper::setup()でeditDisabled/manageDisabled/deleteDisabledを各コンテンツ種別アイテムに追加し、権限サービスの結果を保持- ツリーで新規追加したノード生成時(
createContent成功時)に、保持された disabled 値をノードへコピーして即時反映 - 上記の追加項目がセットされることのテストを追加
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/bc-admin-third/webroot/js/admin/common.bundle.js | ビルド成果物側にも、追加直後ノードへ disabled 状態を反映する変更を取り込み |
| plugins/bc-admin-third/src/js/admin/common/lib/jquery.bcTree.js | 追加直後に生成するノードへ edit/manage/delete の disabled 状態を設定から反映 |
| plugins/baser-core/tests/TestCase/View/Helper/BcContentsHelperTest.php | editDisabled/manageDisabled/deleteDisabled が各アイテムへセットされることを確認するテストを追加 |
| plugins/baser-core/src/View/Helper/BcContentsHelper.php | 権限チェック結果を items 設定へ保持(JS側での動的ノード生成時に利用) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
よろしくお願いします!