•  
      request #36817 Inconsistency in JSON representation of perm
    Infos
    #36817
    Guilhem Bonnefille (CS) (gbonnefille)
    2024-02-13 08:52
    2024-02-09 18:21
    38401
    Details
    Inconsistency in JSON representation of perm

    When retrieving a "perm" field, its format is:

    {"field_id":94367,"label":"Visibilit\u00e9","type":"perm","granted_groups":["One","Two"],"granted_groups_ids":["1849","2149"]}
    

    But when updating with such format, we encounter an error:

    400 Bad Request: Permission field values must be passed as an array of ugroup ids e.g. "value" : {"granted_groups" : [158, "142_3"]}
    

    Thus, we have to upload something like:

    {"field_id":94367,"value":{"granted_groups":["1849","2149"]}}
    

    Please, note the intermediate attribute value and the drop of suffix _ids.

    API
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    New
    Empty
    Attachments
    Empty
    References
    Referenced by request #36817

    Follow-ups