Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AoU-Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
AoU
AoU-Backend
Merge requests
!10
feat: add role entity, controller and service
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
feat: add role entity, controller and service
adf-106-structures-users
into
master
Overview
10
Commits
3
Pipelines
0
Changes
15
Merged
Alicia.DeDiosFuente
requested to merge
adf-106-structures-users
into
master
4 years ago
Overview
10
Commits
3
Pipelines
0
Changes
15
Expand
https://issues.unige.ch/browse/AOU-139
0
0
Merge request reports
Compare
master
version 4
cea2ea45
4 years ago
version 3
64f8f342
4 years ago
version 2
16884ddf
4 years ago
version 1
4e0461b5
4 years ago
master (base)
and
latest version
latest version
1e97a248
3 commits,
4 years ago
version 4
cea2ea45
2 commits,
4 years ago
version 3
64f8f342
2 commits,
4 years ago
version 2
16884ddf
2 commits,
4 years ago
version 1
4e0461b5
1 commit,
4 years ago
15 files
+
562
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
15
Search (e.g. *.vue) (Ctrl+P)
AoU-Admin/src/main/java/ch/unige/aou/controller/admin/RoleController.java
0 → 100644
+
50
−
0
Options
package
ch.unige.aou.controller.admin
;
import
ch.unige.aou.controller.AdminController
;
import
ch.unige.aou.model.security.Role
;
import
ch.unige.aou.rest.UrlPath
;
import
ch.unige.solidify.controller.ResourceController
;
import
ch.unige.solidify.security.AdminPermissions
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
ch.unige.solidify.security.RootPermissions
;
@AdminPermissions
@RestController
@ConditionalOnBean
(
AdminController
.
class
)
@RequestMapping
(
UrlPath
.
ADMIN_ROLE
)
public
class
RoleController
extends
ResourceController
<
Role
>
{
@Override
@RootPermissions
public
HttpEntity
<
Role
>
create
(
@RequestBody
Role
role
)
{
return
super
.
create
(
role
);
}
@Override
@RootPermissions
public
HttpStatus
delete
(
@PathVariable
String
id
)
{
return
super
.
delete
(
id
);
}
@Override
@RootPermissions
public
HttpStatus
deleteList
(
@RequestBody
String
[]
ids
)
{
return
super
.
deleteList
(
ids
);
}
@Override
@RootPermissions
public
HttpEntity
<
Role
>
update
(
@PathVariable
String
id
,
@RequestBody
Role
role
)
{
return
super
.
update
(
id
,
role
);
}
}
Loading