-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * Fix unit tests * Fix Psalm * Fix rector * Rename method [skip ci] * Fix logic and order * Fix logic with "can" * chore [skip ci] * Add methods for getting items by names' list * Fix coverage * Fix exceptions * Move TODO to issue [skip ci] * chore [skip ci] * Add AssignmentsStorage::getUserIdsByItemNames() * Apply fixes from StyleCI * Add AssignmentsStorage::userHasPermission() * More "exists" methods * Fix Psalm * Fix unit tests, rename * Test get direct children * Fix copy paste * All child permissions + all child roles * has child + has direct child * test for role exists * Add tests for getting items by names * Assignments - test for getting by item names * Assignments - test for exists * Assignments - test for user has item * Test exception for coverage * Ignore order * Sync with rbac-php, minor adjustments * Psalm - type for item names * Psalm - fix unused foreach variable * Psalm - simplify type * Minor improvements regarding recursive methods * Update CHANGELOG [skip ci] * Improve handling and control of `Assignment::$createdAt` * Revert "Improve handling and control of `Assignment::$createdAt`" This reverts commit cd55145. * Test storages (#192) * Test fake storages * Naming (review) * Exclude parent role from `Manager::getAllChildRoles()` (#191) * The rest of renaming * Improve handling and control of `Assignment::$createdAt` (#190) * Improve handling and control of `Assignment::$createdAt` * Apply Rector changes (CI) * Resolve merge conflicts * Update changelog (review) * Fix wording [skip ci] --------- Co-authored-by: arogachev <[email protected]> * Update CHANGELOG.md Co-authored-by: Sergei Predvoditelev <[email protected]> * Update src/Exception/DefaultRolesNotFoundException.php Co-authored-by: Sergei Predvoditelev <[email protected]> * Update CHANGELOG with new methods info [skip ci] * Add info about changing exception [skip ci] --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: arogachev <[email protected]> Co-authored-by: Sergei Predvoditelev <[email protected]>
- Loading branch information
1 parent
4e46f99
commit 5a62e63
Showing
23 changed files
with
1,063 additions
and
439 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ phpunit.phar | |
/phpunit.xml | ||
# phpunit cache | ||
.phpunit.result.cache | ||
/.phpunit.cache |
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Rbac\Exception; | ||
|
||
use RuntimeException; | ||
use Yiisoft\FriendlyException\FriendlyExceptionInterface; | ||
|
||
final class DefaultRolesNotFoundException extends RuntimeException implements FriendlyExceptionInterface | ||
{ | ||
public function getName(): string | ||
{ | ||
return 'Default roles not found.'; | ||
} | ||
|
||
public function getSolution(): ?string | ||
{ | ||
return <<<SOLUTION | ||
You have to add roles with Manager::addRole() before using them as default. | ||
SOLUTION; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.