Skip to content

Commit

Permalink
Merge pull request #11 from hans-thomas/add-keyworkds
Browse files Browse the repository at this point in the history
Update composer.json
  • Loading branch information
hans-thomas authored Dec 8, 2024
2 parents 0bd9bcf + 4e1a694 commit 7092dfd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"name": "hans-thomas/horus",
"description": "a roles and permissions manager",
"keywords": [
"acl",
"roles",
"permission",
"laravel-packages",
"roles-management",
"permission-management"
],
"type": "library",
"license": "MIT",
"authors": [
Expand Down
4 changes: 2 additions & 2 deletions src/Services/HorusService.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ public function createPermissionsUsingPolicy(
);
}

$policy = collect(( new ReflectionClass($policyClass) )->getMethods())->pluck('name');
$policy = collect((new ReflectionClass($policyClass))->getMethods())->pluck('name');

// collect HandlesAuthorization trait method to ignore if used on policy class
$handlesTrait = collect(
( new ReflectionClass(HandlesAuthorization::class) )->getMethods()
(new ReflectionClass(HandlesAuthorization::class))->getMethods()
)
->pluck('name');

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/HorusServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ public function createPermissionsUsingPolicyWithDifferentGuardAndIgnoredMethods(
);

$this->assertDatabaseMissing(
( new Permission() )->getTable(),
(new Permission())->getTable(),
[
'name' => "tests{$this->separator}instances{$this->separator}models{$this->separator}post{$this->separator}viewComments",
]
Expand Down

0 comments on commit 7092dfd

Please sign in to comment.