Skip to content

fix #3012 【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断される件を修正#4414

Open
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#3012
Open

fix #3012 【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断される件を修正#4414
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#3012

Conversation

@kaburk

@kaburk kaburk commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします!

Copilot AI review requested due to automatic review settings June 5, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 プレフィックス差し替えケースを追加し、Configuretry/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のテストケース追加と、テスト内での設定上書きを安全に復元する処理を追加

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants