refactor: kb & station & terminal
This commit is contained in:
@@ -15,16 +15,7 @@ class DocumentService
|
||||
*/
|
||||
public function validateDocumentAccess(Document $document, User $user): bool
|
||||
{
|
||||
if ($document->type === 'global') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($document->type === 'dedicated') {
|
||||
$userGroupIds = $user->groups()->pluck('groups.id')->toArray();
|
||||
return in_array($document->group_id, $userGroupIds);
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user