Skip to content
Snippets Groups Projects
Commit fe55d55d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

SUppression champ 'name' dans la table des rôles (user_role).

parent 6100facd
Branches
Tags
No related merge requests found
......@@ -12,7 +12,6 @@ CREATE TABLE user (
CREATE TABLE IF NOT EXISTS `user_role` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`role_id` VARCHAR(64) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`is_default` TINYINT(1) NOT NULL DEFAULT 0,
`parent_id` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
......@@ -31,5 +30,8 @@ CREATE TABLE IF NOT EXISTS `user_role_linker` (
CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;
INSERT INTO user_role (role_id, description, is_default)
VALUES ('guest', 'Invité', 1);
INSERT INTO `user_role` (`id`, `role_id`, `is_default`, `parent_id`) VALUES
(1, 'Standard', 1, NULL),
(2, 'Gestionnaire', 0, 1),
(3, 'Super-gestionnaire', 0, 2),
(4, 'Administrateur de l''application', 0, 3);
......@@ -33,12 +33,6 @@ class Role implements HierarchicalRoleInterface
*/
protected $roleId;
/**
* @var string
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $name;
/**
* @var boolean
* @ORM\Column(name="is_default", type="boolean", nullable=false)
......@@ -97,29 +91,6 @@ class Role implements HierarchicalRoleInterface
return $this;
}
/**
* Get the role name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set the role name.
*
* @param string $name
*
* @return self
*/
public function setName($name)
{
$this->name = (string) $name;
return $this;
}
/**
* Is this role the default one ?
*
......
......@@ -41,12 +41,6 @@ class RoleTest extends PHPUnit_Framework_TestCase
$this->assertEquals('content', $this->role->getRoleId());
}
public function testCanSetName()
{
$this->role->setName('content');
$this->assertEquals('content', $this->role->getName());
}
public function testCanSetIsDefault()
{
$this->role->setIsDefault(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment