for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Tinyissue package.
*
* (c) Mohamed Alsharaf <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tinyissue\Extensions\Policies;
use Tinyissue\Model\Project;
use Tinyissue\Model\User;
trait ProjectAccess
{
/**
* Check if public project enabled and current project is public.
* @param Project $project
* @return bool
protected function isPublicProject(Project $project)
$isPublicEnabled = app('tinyissue.settings')->isPublicProjectsEnabled();
return $isPublicEnabled && $project->isPublic();
}