fix #3769 【アクセスルールグループ】システム管理者以外にユーザー管理グループで削除権限を与えてもユーザー削除できない件を修正#4403
Open
kaburk wants to merge 1 commit into
Open
fix #3769 【アクセスルールグループ】システム管理者以外にユーザー管理グループで削除権限を与えてもユーザー削除できない件を修正#4403kaburk 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
アクセスルールグループで「ユーザー削除」権限を付与した際に、システム管理者以外でも一般ユーザーを削除できるようにするため、ユーザー削除可否判定(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 | 新しい削除可否条件に合わせてテストケースを拡充・コメント修正 |
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.
よろしくお願いします。