mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 13:07:02 +00:00
refactor/tweak the role name to CanGetApiCollectionsForUser
This commit is contained in:
parent
e95a4c3310
commit
ebb7d54564
@ -323,8 +323,8 @@ object ApiRole {
|
||||
case class CanGetApiCollection(requiresBankId: Boolean = false) extends ApiRole
|
||||
lazy val canGetApiCollection = CanGetApiCollection()
|
||||
|
||||
case class CanGetAllApiCollectionsForUser(requiresBankId: Boolean = false) extends ApiRole
|
||||
lazy val canGetAllApiCollectionsForUser = CanGetAllApiCollectionsForUser()
|
||||
case class CanGetApiCollectionsForUser(requiresBankId: Boolean = false) extends ApiRole
|
||||
lazy val canGetApiCollectionsForUser = CanGetApiCollectionsForUser()
|
||||
|
||||
case class CanGetAllApiCollections(requiresBankId: Boolean = false) extends ApiRole
|
||||
lazy val canGetAllApiCollections = CanGetAllApiCollections()
|
||||
|
||||
@ -9065,7 +9065,7 @@ trait APIMethods400 {
|
||||
UnknownError
|
||||
),
|
||||
List(apiTagApiCollection, apiTagNewStyle),
|
||||
Some(canGetAllApiCollectionsForUser :: Nil)
|
||||
Some(canGetApiCollectionsForUser :: Nil)
|
||||
)
|
||||
|
||||
lazy val getApiCollectionsForUser: OBPEndpoint = {
|
||||
|
||||
@ -232,7 +232,7 @@ class ApiCollectionTest extends V400ServerSetup {
|
||||
responseApiEndpoint6.body.toString contains(s"$UserHasMissingRoles") should be (true)
|
||||
|
||||
Then("grant the role and test it again")
|
||||
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.canGetAllApiCollectionsForUser.toString)
|
||||
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.canGetApiCollectionsForUser.toString)
|
||||
val responseApiEndpoint6WithRole = makeGetRequest(requestApiEndpoint6)
|
||||
|
||||
Then("We should get a 200")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user