Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions plugins/baser-core/src/Service/UsersService.php
Comment thread
ryuring marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@ private function createIndexConditions(Query $query, array $params): Query
public function create(array $postData): ?EntityInterface
{
$loginUser = BcUtil::loginUser();
if(empty($postData['user_groups']['_ids'])) {
throw new BcException(__d('baser_core', 'ユーザーグループを指定してください。'));
}
if(in_array(Configure::read('BcApp.adminGroupId'), $postData['user_groups']['_ids'])) {
if(!empty($postData['user_groups']['_ids']) && in_array(Configure::read('BcApp.adminGroupId'), $postData['user_groups']['_ids'])) {
if(BcUtil::isInstalled() && !$loginUser->isAddableToAdminGroup()) {
throw new BcException(__d('baser_core', '特権エラーが発生しました。'));
}
Expand Down
Loading