Skip to content

Commit

Permalink
fix install create administrator
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Sep 24, 2023
1 parent 8306b7e commit 95782ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/Repositories/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ public function store(array $params)
}
if (!empty($params['class'])) {
$class =intval($params['class']);
$authUser = Auth::user();
if ($authUser && $class >= $authUser->class) {
throw new InsufficientPermissionException('No permission');
if (!IN_NEXUS) {
$authUser = Auth::user();
if ($authUser && $class >= $authUser->class) {
throw new InsufficientPermissionException('No permission');
}
}
} else {
$class = User::CLASS_USER;
Expand Down
2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.8');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-09-23');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-09-25');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
Expand Down

0 comments on commit 95782ff

Please sign in to comment.