Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断されてしまうようです #3012

Open
kaburk opened this issue Jan 5, 2024 · 3 comments
Assignees
Labels
Reviewed レビュー済

Comments

@kaburk
Copy link
Collaborator

kaburk commented Jan 5, 2024

概要

イベント処理などでBcUtil::isAdminSystemで判別しようとしたときに発生しました。
内部の処理を追ってみるとコンテンツ管理などでAPIで処理しているURLの判別が必要な時に
APIのURLなのでプレフィックスが異なる扱いになってしまい管理画面ではないと判断されてしまうようです。

isAdminSystemの処理の後半の正規表現のチェックにAPI経由の場合の管理画面プレフィックス(/baser/api/admin/)のチェックを追加すると対応できそうです。

スクリーンショット 2024-01-05 20 06 43

baserCMS version : 5.0.8-dev

@ryuring
Copy link
Collaborator

ryuring commented Jan 6, 2024

@kaburk 報告ありがとうございます。管理画面と管理用APIは分けた方がよいかもと考えていますがいかがでしょう?
isAdminApi() を作るとか。

@ryuring ryuring added the Reviewed レビュー済 label Jan 6, 2024
@kaburk
Copy link
Collaborator Author

kaburk commented Jan 10, 2024

@ryuring isAdminApi() あると良さそうですね!

@ryuring
Copy link
Collaborator

ryuring commented Jan 10, 2024

@kaburk 実装お願いしますw

@ryuring ryuring changed the title BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断されてしまうようです 【API】BcUtil::isAdminSystem でAPI経由で処理しているURLが管理画面ではないと判断されてしまうようです Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed レビュー済
Projects
None yet
Development

No branches or pull requests

2 participants