rest api AML

Is it possible to send body with AML to rest api and get aml response?

I could create a method that accepts string and parse the aml and reply but not sure how that would apply on the rights (trying to get only the items the logged in user can see, not the items that the user under which the method will be called - assuming "credentials" are not forwarded)

Parents
  • You can pass in the AML and the IdentityName of that user and use the following code:

    var identityName = "Administrators";
    var identity = Aras.Server.Security.Identity.GetByName(identityName);
    bool permissionWasSet = false;
    try
    {
      permissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(identity);
      return item.apply();
    }
    finally
    {
    if (permissionWasSet)
    {
      Aras.Server.Security.Permissions.RevokeIdentity(identity);
    }

Reply
  • You can pass in the AML and the IdentityName of that user and use the following code:

    var identityName = "Administrators";
    var identity = Aras.Server.Security.Identity.GetByName(identityName);
    bool permissionWasSet = false;
    try
    {
      permissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(identity);
      return item.apply();
    }
    finally
    {
    if (permissionWasSet)
    {
      Aras.Server.Security.Permissions.RevokeIdentity(identity);
    }

Children