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
!171
refactor: rename hasValidationRights into onlyWithValidationRights
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
refactor: rename hasValidationRights into onlyWithValidationRights
MVO-rename-hasValidationRights
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Mathieu.Vonlanthen
requested to merge
MVO-rename-hasValidationRights
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
master
version 1
543d03e5
4 years ago
master (base)
and
latest version
latest version
574272a6
1 commit,
4 years ago
version 1
543d03e5
1 commit,
4 years ago
2 files
+
7
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
AoU-Admin/src/main/java/ch/unige/aou/controller/admin/UserController.java
+
3
−
4
Options
@@ -3,7 +3,6 @@ package ch.unige.aou.controller.admin;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
@@ -88,10 +87,10 @@ public class UserController extends ResourceController<User> {
return
super
.
list
(
search
,
pageable
);
}
@GetMapping
(
params
=
"
has
ValidationRights"
)
public
HttpEntity
<
Collection
<
User
>>
list
(
@RequestParam
boolean
has
ValidationRights
,
@ModelAttribute
User
search
,
Pageable
pageable
)
{
@GetMapping
(
params
=
"
onlyWith
ValidationRights"
)
public
HttpEntity
<
Collection
<
User
>>
list
(
@RequestParam
boolean
onlyWith
ValidationRights
,
@ModelAttribute
User
search
,
Pageable
pageable
)
{
final
UserSpecification
spec
=
(
UserSpecification
)
this
.
itemService
.
getSpecification
(
search
);
spec
.
set
Has
ValidationRights
(
has
ValidationRights
);
spec
.
set
OnlyWith
ValidationRights
(
onlyWith
ValidationRights
);
final
Page
<
User
>
listItem
=
this
.
itemService
.
findAll
(
spec
,
pageable
);
this
.
setRessourceLinks
(
listItem
);
final
Collection
<
User
>
collection
=
this
.
setCollectionLinks
(
listItem
,
pageable
);
Loading