Skip to content

Commit

Permalink
Fix view permission for relationship manager
Browse files Browse the repository at this point in the history
  • Loading branch information
notAreYouScared committed Dec 1, 2024
1 parent a9a5a2b commit fb9900c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ protected function getFormActions(): array

public function getRelationManagers(): array
{
if (auth()->user()->can('viewList database')) {
return [DatabasesRelationManager::class];
if (DatabasesRelationManager::canViewForRecord($this->getRecord(), static::class)) {
return [
DatabasesRelationManager::class,
];
}

return [];
Expand Down

0 comments on commit fb9900c

Please sign in to comment.