File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ paths:
188
188
get :
189
189
description : >-
190
190
Get all resource roles. If isActive parameter is provided, filter the
191
- results by isActive property .
191
+ results by the set properties .
192
192
tags :
193
193
- Resource Roles
194
194
security :
@@ -202,6 +202,18 @@ paths:
202
202
type : string
203
203
in : query
204
204
description : Filters the results based on the `name` property
205
+ - name : legacyId
206
+ type : number
207
+ in : query
208
+ description : Filters the results based on the `legacyId` property
209
+ - name : selfObtainable
210
+ type : boolean
211
+ in : query
212
+ description : Filters the results based on the `selfObtainable` property
213
+ - name : fullAccess
214
+ type : boolean
215
+ in : query
216
+ description : Filters the results based on the `fullAccess` property
205
217
responses :
206
218
' 200 ' :
207
219
description : OK - the request was successful
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ async function getResourceRoles (criteria) {
20
20
let records = await helper . scan ( 'ResourceRole' )
21
21
if ( criteria . name ) records = _ . filter ( records , e => ( criteria . name === e . name ) )
22
22
if ( criteria . id ) records = _ . filter ( records , e => ( criteria . id === e . id ) )
23
+ if ( criteria . legacyId ) records = _ . filter ( records , e => ( _ . toNumber ( criteria . legacyId ) === _ . toNumber ( e . legacyId ) ) )
23
24
if ( ! _ . isUndefined ( criteria . isActive ) ) records = _ . filter ( records , e => ( e . isActive === ( criteria . isActive === 'true' ) ) )
24
25
if ( ! _ . isUndefined ( criteria . selfObtainable ) ) records = _ . filter ( records , e => ( e . selfObtainable === ( criteria . selfObtainable === 'true' ) ) )
25
26
if ( ! _ . isUndefined ( criteria . fullAccess ) ) records = _ . filter ( records , e => ( e . fullAccess === ( criteria . fullAccess === 'true' ) ) )
@@ -33,6 +34,7 @@ getResourceRoles.schema = {
33
34
selfObtainable : Joi . boolean ( ) ,
34
35
fullAccess : Joi . boolean ( ) ,
35
36
id : Joi . id ( ) ,
37
+ legacyId : Joi . number ( ) ,
36
38
name : Joi . string ( )
37
39
} ) . required ( )
38
40
}
You can’t perform that action at this time.
0 commit comments