Api roles, the add/delete action

Hi.

The version of Opendistro is 1.0.2

I’m trying to add one more index permission to an existing role.

PATCH https://localhost:9200/_opendistro/_security/api/roles
[  
   {  
      "op":"add",
      "path":"acc_role_80c594958e3044e7a6708625770b28cd",
      "value": {
      	"index_permissions":       [  
         {  
            "index_patterns":[  
               "profile_for_80c594958e3044e7a6708625770b28cdr"
            ],
            "allowed_actions":[  
               "read"
            ],
            "dls":"{\"bool\":{\"should\":[{\"terms\":{\"orgs\":[\"41e2baa9c15748b3b3cab96d631e806f\"]}}]}}"
         }
        ]
      }
   }
]

I get the following response

{
    "status": "OK",
    "message": "'acc_role_80c594958e3044e7a6708625770b28cd' updated."
}

I expected that the code above would add the new index pattern to the list of index patterns but instead it replaced existed ones.

the same behaviour with this code

PATCH 
 https://localhost:9200/_opendistro/_security/api/roles/acc_role_80c594958e3044e7a6708625770b28cd
[  
   {  
      "op":"add",
      "path":"indeces/index_permissions",
      "value": 
      	[  
         {  
            "index_patterns":[  
               "profile_for_80c594958e3044e7a6708625770b28cdr"
            ],
            "allowed_actions":[  
               "read"
            ],
            "dls":"{\"bool\":{\"should\":[{\"terms\":{\"orgs\":[\"41e2baa9c15748b3b3cab96d631e806f\"]}}]}}"
         }
        ]

   }
]

unfortunately, I could not find an answer here deprecated-security-advanced-modules/RolesApiTest.java at 96b39c04c8ae25d214cc4c521d89a324935b7a7c · opendistro-for-elasticsearch/deprecated-security-advanced-modules · GitHub

Partly solution that I found is to add a specific index to the path.

[  
   {  
      "op":"add",
      "path":"indeces/index_permissions/1",
      "value": 
      	  
         {  
            "index_patterns":[  
               "4profile_for_80c594958e3044e7a6708625770b28cdr"
            ],
            "allowed_actions":[  
               "read"
            ],
            "dls":"{\"bool\":{\"should\":[{\"terms\":{\"orgs\":[\"41e2baa9c15748b3b3cab96d631e806f\"]}}]}}"
         }
   }
]

The same with remove, I just can allowed to remove by index…