Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
auth
Commits
fe55d55d
Commit
fe55d55d
authored
11 years ago
by
Bertrand Gauthier
Browse files
Options
Downloads
Patches
Plain Diff
SUppression champ 'name' dans la table des rôles (user_role).
parent
6100facd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
data/schema.sql
+5
-3
5 additions, 3 deletions
data/schema.sql
src/UnicaenAuth/Entity/Db/Role.php
+0
-29
0 additions, 29 deletions
src/UnicaenAuth/Entity/Db/Role.php
tests/UnicaenAuthTest/Entity/Db/RoleTest.php
+0
-6
0 additions, 6 deletions
tests/UnicaenAuthTest/Entity/Db/RoleTest.php
with
5 additions
and
38 deletions
data/schema.sql
+
5
−
3
View file @
fe55d55d
...
...
@@ -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
);
This diff is collapsed.
Click to expand it.
src/UnicaenAuth/Entity/Db/Role.php
+
0
−
29
View file @
fe55d55d
...
...
@@ -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 ?
*
...
...
This diff is collapsed.
Click to expand it.
tests/UnicaenAuthTest/Entity/Db/RoleTest.php
+
0
−
6
View file @
fe55d55d
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment