Add project listing selector, confirmed revision and private 3MF renders
This commit is contained in:
@@ -15,4 +15,13 @@ class ProjectFilePolicy
|
||||
{
|
||||
return $user->role === 'admin' && $file->revision->project_id === $project->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Same IDOR guard as download(): generating or viewing a rendered preview
|
||||
* must only ever be reachable through the project the file actually belongs to.
|
||||
*/
|
||||
public function render(User $user, ProjectFile $file, Project $project): bool
|
||||
{
|
||||
return $user->role === 'admin' && $file->revision->project_id === $project->id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user