clean menu builder for activity

This commit is contained in:
2021-06-29 21:03:38 +02:00
parent b5a78fa341
commit 1e2a920200
2 changed files with 1 additions and 87 deletions

View File

@@ -15,8 +15,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\Menu;
namespace Chill\ActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
@@ -65,15 +64,6 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
->setExtra('order', 201)
;
}
if ($this->authorizationChecker->isGranted(ActivityVoter::CREATE, $person)) {
$menu->addChild(
$this->translator->trans('Add a new activity'), [
'route' => 'chill_activity_activity_new',
'routeParameters' => [ 'person_id' => $person->getId() ],
])
->setExtra('order', 200)
;
}
}
public static function getMenuIds(): array