Skip to content

fix #3769 【アクセスルールグループ】システム管理者以外にユーザー管理グループで削除権限を与えてもユーザー削除できない件を修正#4403

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

Conversation

@kaburk

@kaburk kaburk commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします。

Copilot AI review requested due to automatic review settings June 1, 2026 13:52

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

アクセスルールグループで「ユーザー削除」権限を付与した際に、システム管理者以外でも一般ユーザーを削除できるようにするため、ユーザー削除可否判定(User::isDeletableUser())のロジックとテストを更新するPRです。

Changes:

  • User::isDeletableUser() を「自己削除は不可」「スーパーユーザーはスーパーユーザーを削除不可」「非スーパーユーザーは(スーパーユーザー/システム管理ユーザー以外を)削除可」という判定に変更
  • UserTest::testIsDeletableUser() に「非管理ユーザーが別の非管理ユーザーを削除できる」ケース等を追加し、コメントも整理

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/baser-core/src/Model/Entity/User.php ユーザー削除可否判定をアクセスルール前提の方針に合わせて調整(自己削除禁止を明示化)
plugins/baser-core/tests/TestCase/Model/Entity/UserTest.php 新しい削除可否条件に合わせてテストケースを拡充・コメント修正

Comment thread plugins/baser-core/src/Model/Entity/User.php Outdated
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