When flag is true the user will be provided with edit permissions by owning entity id even the user have no permission by Subscriber,
when the flag is false the user provided with edit permission by Subscriber.
+* FLAG_2006_LIMIT_OWNING_ENTITY_SELECTION_BY_ROLES
+ While service instantiation, when flag is enabled, a user will not be able to choose Owning Entity which she has no
+ matching role for. Relevant roles can be provided by using FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY.
+
* FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF
When flag is true new VF Modules on Alacarte service will inherit LCP-Region and Tenant from parent VNF.
When off, user is requested to specify LCP-Region and Tenant for each VF Module.
\ No newline at end of file
import org.onap.vid.category.CategoryParameterOptionRep
import org.onap.vid.category.CategoryParametersResponse
import org.onap.vid.model.CategoryParameter
+import org.onap.vid.properties.Features
import org.onap.vid.roles.RoleProvider
import org.onap.vid.roles.WithPermissionPropertiesOwningEntity
import org.springframework.beans.factory.annotation.Qualifier
private val owningEntityKey = "owningEntity"
- private fun shouldTreatPermissions() = false
+ private fun shouldTreatPermissions() = featureManager.isActive(Features.FLAG_2006_LIMIT_OWNING_ENTITY_SELECTION_BY_ROLES)
override fun getCategoryParameters(familyName: CategoryParameter.Family?): CategoryParametersResponse {
val categoryParameters =
?.filter { userRolesValidator.isServicePermitted(it) }
}
-
- class OwningEntityOptionRep(categoryParameterOptionRep: CategoryParameterOptionRep) :
- CategoryParameterOptionRep(categoryParameterOptionRep.id, categoryParameterOptionRep.name),
- WithPermissionPropertiesOwningEntity {
+ /**
+ * Encapsulates a CategoryParameterOptionRep where id field contains an owningEntityId
+ */
+ class OwningEntityOptionRep(option: CategoryParameterOptionRep) :
+ CategoryParameterOptionRep(option.id, option.name), WithPermissionPropertiesOwningEntity {
override val owningEntityId: String?
@JsonIgnore get() = id
}
"userId": "1",
"password": "1"
},
- "roles": ["SILVIA ROBBINS___TYLER SILVIA", "SILVIA ROBBINS___DARREN MCGEE", "CAR_2020_ER___DARREN MCGEE", "CAR_2020_ER___MSO-dev-service-type", "CAR_2020_ER___TYLER SILVIA","READ___LOGS___PERMITTED","Emanuel___mySubType", "global-customer-id___service-instance-type"],
+ "roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
+ "SILVIA ROBBINS___TYLER SILVIA", "SILVIA ROBBINS___DARREN MCGEE", "CAR_2020_ER___DARREN MCGEE", "CAR_2020_ER___MSO-dev-service-type", "CAR_2020_ER___TYLER SILVIA","READ___LOGS___PERMITTED","Emanuel___mySubType", "global-customer-id___service-instance-type"
+ ],
"subscriberNames": ["SILVIA ROBBINS", "CAR_2020_ER", "Emanuel", "global-customer-id"],
"serviceTypes": ["TYLER SILVIA", "DARREN MCGEE", "MSO-dev-service-type"],
"tenants": ["092eb9e8e4b7412e8787dd091bc58e86"]
"userId": "3",
"password": "3"
},
- "roles": ["Emanuel___Emanuel"],
+ "roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
+ "Emanuel___Emanuel"
+ ],
"subscriberNames": ["Emanuel"],
"serviceTypes": ["Emanuel"],
"tenants": ["c630e297a3ae486497d63eacec1d7c14", "d3b49834f7164cbe831bfbfa35ef649b"]
"userId": "667",
"password": "667"
},
- "roles": ["CRAIG/ROBERTS___AIM Transport"],
+ "roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
+ "CRAIG/ROBERTS___AIM Transport"
+ ],
"subscriberNames": ["CRAIG/ROBERTS"],
"serviceTypes": ["AIM Transport"],
"tenants": null
"userId": "4",
"password": "4"
},
- "roles": ["Emanuel___vWINIFRED", "Emanuel___vRichardson"],
+ "roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
+ "Emanuel___vWINIFRED", "Emanuel___vRichardson"
+ ],
"subscriberNames": ["Emanuel"],
"serviceTypes": ["vWINIFRED", "vRichardson"],
"tenants": ["092eb9e8e4b7412e8787dd091bc58e86"]
"password": "822"
},
"roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
"JULIO ERICKSON___Emanuel",
"JULIO ERICKSON___vRichardson"
"password": "312"
},
"roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
"Emanuel___vRichardson"
],
"subscriberNames": ["Emanuel"],
"password": "312"
},
"roles": [
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc___LOB", "Melissa___LOB", "aaa1___LOB",
"Emanuel___vWINIFRED___test-hvf6-09"
],
"subscriberNames": ["Emanuel"],