Skip to content

Commit

Permalink
Remove Permissions form
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed Sep 20, 2014
1 parent 2cd1d03 commit 7ea8653
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 178 deletions.
164 changes: 0 additions & 164 deletions src/Security/AdminModule/PermissionsFormFactory.php

This file was deleted.

8 changes: 0 additions & 8 deletions src/Security/AdminModule/RolesTableFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Kdyby\Doctrine\EntityDao;
use Nette\Localization\ITranslator;
use Venne\Security\RoleEntity;
use Venne\System\Components\AdminGrid\Form;
use Venne\System\Components\AdminGrid\IAdminGridFactory;

/**
Expand All @@ -29,9 +28,6 @@ class RolesTableFactory
/** @var \Venne\Security\AdminModule\RoleFormFactory */
private $roleForm;

/** @var \Venne\Security\AdminModule\PermissionsFormFactory */
private $permissionsForm;

/** @var \Venne\System\Components\AdminGrid\IAdminGridFactory */
private $adminGridFactory;

Expand All @@ -40,14 +36,12 @@ class RolesTableFactory

public function __construct(
EntityDao $dao,
PermissionsFormFactory $permissionsForm,
RoleFormFactory $roleForm,
IAdminGridFactory $adminGridFactory,
ITranslator $translator
)
{
$this->dao = $dao;
$this->permissionsForm = $permissionsForm;
$this->roleForm = $roleForm;
$this->adminGridFactory = $adminGridFactory;
$this->translator = $translator;
Expand Down Expand Up @@ -91,10 +85,8 @@ public function create()
->getElementPrototype()->class[] = 'ajax';

$form = $admin->addForm('role', 'Role', $this->roleForm);
$permissionsForm = $admin->addForm('permissions', 'Permissions', $this->permissionsForm, null, Form::TYPE_LARGE);

$admin->connectFormWithAction($form, $table->getAction('edit'));
$admin->connectFormWithAction($permissionsForm, $table->getAction('permissions'), $admin::MODE_PLACE);

// Toolbar
$toolbar = $admin->getNavbar();
Expand Down
6 changes: 0 additions & 6 deletions src/Security/DI/SecurityExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ public function loadConfiguration()

public function setupSecurity(ContainerBuilder $container)
{
$container->addDefinition($this->prefix('permissionsFormFactory'))
->setClass('Venne\Security\AdminModule\PermissionsFormFactory', array(
new Statement('@system.admin.basicFormFactory'),
new Statement('@doctrine.dao', array('Venne\Security\RoleEntity'))
));

$container->addDefinition($this->prefix('roleFormFactory'))
->setClass('Venne\Security\AdminModule\RoleFormFactory', array(new Statement('@system.admin.ajaxFormFactory')));

Expand Down

0 comments on commit 7ea8653

Please sign in to comment.