fix #3012 【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断される件を修正#4414
Open
kaburk wants to merge 1 commit into
Open
fix #3012 【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断される件を修正#4414kaburk 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
本PRは、BcUtil::isAdminSystem() が API 経由で処理している URL(例: /baser/api/admin/...)を管理画面として判定できない問題(#3012)を修正し、管理画面判定を「管理画面(Admin)」と「Admin Web API(Api/Admin)」の双方の URL エイリアス設定に追従させるものです。
Changes:
BcUtil::isAdminSystem()の判定ロジックを、管理画面用 alias と API管理画面用 alias の両方に対応する正規表現へ変更BcUtilTest::testIsAdminSystem()に API プレフィックス差し替えケースを追加し、Configureをtry/finallyで確実に復元- データプロバイダに API 管理画面 URL の追加ケース(
api/rest)を拡充
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/baser-core/src/Utility/BcUtil.php | 管理画面判定を Admin / Api/Admin の alias ベースに変更し、API管理画面URLも管理画面として判定できるように修正 |
| plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php | API管理画面URLのテストケース追加と、テスト内での設定上書きを安全に復元する処理を追加 |
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.
よろしくお願いします!