Add todos to support IdentityProviderAdmin in the Daml-Script (#15858)

* Add todos to support IdentityProviderAdmin in the Daml-Script

* update todo
This commit is contained in:
Sergey Kisel 2022-12-14 11:00:57 +01:00 committed by GitHub
parent 9279f610ca
commit db7f629c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -759,7 +759,10 @@ object Converter {
def toRight(constructor: String, rank: Int, value: SValue): SValue =
SVariant(scriptIds.damlScript("UserRight"), Name.assertFromString(constructor), rank, value)
Right(right match {
case UserRight.IdentityProviderAdmin => toRight("IdentityProviderAdmin", 0, SUnit)
case UserRight.IdentityProviderAdmin =>
// TODO #15857
// Add support for the `IdentityProviderAdmin` in the Daml Script
sys.error("IdentityProviderAdmin user right has not been supported yet")
case UserRight.ParticipantAdmin => toRight("ParticipantAdmin", 0, SUnit)
case UserRight.CanActAs(p) => toRight("CanActAs", 1, SParty(p))
case UserRight.CanReadAs(p) => toRight("CanReadAs", 2, SParty(p))
@ -771,7 +774,9 @@ object Converter {
case SVariant(_, "ParticipantAdmin", _, SUnit) =>
Right(UserRight.ParticipantAdmin)
case SVariant(_, "IdentityProviderAdmin", _, SUnit) =>
Right(UserRight.IdentityProviderAdmin)
// TODO #15857
// Add support for the `IdentityProviderAdmin` in the Daml Script
sys.error("IdentityProviderAdmin user right has not been supported yet")
case SVariant(_, "CanReadAs", _, v) =>
toParty(v).map(UserRight.CanReadAs(_))
case SVariant(_, "CanActAs", _, v) =>