Restrict KeyVal Map on account level

nandishnandy
Participant III

Is there any way from MAPI call to restrict enviornment KeyVal Maps on user account level.Once user login he can edit /delete only on his KeyVal maps Have tried assigning permission on Custom Role/enviornments/*/keyvalmap/mapname ,but the permission not working.

0 2 181
2 REPLIES 2

Not applicable

@Nandeesha Looks like you can restrict on the caches but not on KVM.

estebansp
Participant II

Hi @Nandeesha

You sure can give permissions on a custom role to add, edit and delete KVM on an environment scope.

Use the "Add Multiple Resource Permissions for Resource" API call, like you did on the TargetServers resource before, like this:

{ 
  "resourcePermission":[ 
    { 
      "path":"/environments/*/keyvaluemaps", 
      "permissions":["get","put"] 
    }, 
    { 
      "path":"/environments/test/keyvaluemaps/*", 
      "permissions":["get","put","delete"] 
    } 
  ]
}

That should work. I tested it out, and it works for me.

I hope this helps!

Regards,

Esteban S.