I am trying to create User But it show me this error
create of User:User at DA.Internal.Prelude:381:26
failed due to a missing authorization from Bob
here is my sample template
template SystemUser
with
name : Text
systemUser : Party
where
signatory systemUser
nonconsuming choice CreateUser : ContractId User
with
_profileId : Int
_code : Optional Text
_name : Optional Text
_email: Optional Text
user : Party
controller systemUser
do create User with
profileId = _profileId
code = _code
name = _name
email = _email
status = _status
user
systemUser
type UserKey = (Party, Int)
template User
with
profileId : Int
code : Optional Text
name : Optional Text
email: Optional Text
status : Text
user : Party
systemUser : Party
where
signatory [systemUser , user]
key ( user, profileId ) : Userkey
maintainer key._1
here is my scanerio
systemUser <- getParty "Alice"
user <- getParty "Bob"
uid <- submit systemUser do
create SystemUser
with
name = "Alice"
systemUser
asid <- submit systemUser $ exercise uid CreateUser
with
_name = Some "Bob"
_profileId = 1
_code = Some "ATL"
_email = "abc@gmail.com"
user