Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-454

Need a way to specify a property is unavailable

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      1) Define a core term that can be used as a data/metadata annotation:

      <Term Name="Permissions" Type="Core.Permission" AppliesTo="Edm.Property"/>
      <EnumType Name="Permission" Flags="true">
      <Member Name="None" Value="0" />
      <Member Name="Read" Value="1" />
      <Member Name="Write" Value="2" />
      <Member Name="ReadWrite" Value="3" />
      </EnumType>

      1a) For 4.0, we will omit the Write member.

      2) Allow the service to omit properties from the payload that are specified in metadata, even if they are selected. Such omitted properties have no value (as distinct from null) and should be annotated with the Core.Permissions term. Instances with omitted values for properties that appear in the $filter expression are excluded from the result. Accessing an omitted value returns 404.

      3) In the payload, properties that the client does not have permission to read are omitted from the payload (no data:property-name element in ATOM and no name/value pair in JSON) and annotated with the "None" permission.

      Show
      1) Define a core term that can be used as a data/metadata annotation: <Term Name="Permissions" Type="Core.Permission" AppliesTo="Edm.Property"/> <EnumType Name="Permission" Flags="true"> <Member Name="None" Value="0" /> <Member Name="Read" Value="1" /> <Member Name="Write" Value="2" /> <Member Name="ReadWrite" Value="3" /> </EnumType> 1a) For 4.0, we will omit the Write member. 2) Allow the service to omit properties from the payload that are specified in metadata, even if they are selected. Such omitted properties have no value (as distinct from null) and should be annotated with the Core.Permissions term. Instances with omitted values for properties that appear in the $filter expression are excluded from the result. Accessing an omitted value returns 404. 3) In the payload, properties that the client does not have permission to read are omitted from the payload (no data:property-name element in ATOM and no name/value pair in JSON) and annotated with the "None" permission.
    • Resolution:
      Show
      Core: https://www.oasis-open.org/committees/document.php?document_id=49675&wg_abbrev=odata JSON: https://www.oasis-open.org/committees/document.php?document_id=49674&wg_abbrev=odata Atom: https://www.oasis-open.org/committees/document.php?document_id=49673&wg_abbrev=odata Accepted: https://www.oasis-open.org/committees/download.php/49679/odata-meeting-43_on-20130624-minutes.html#odata-454

      Description

      We have added the ability for services to select the set of properties returned in a feed or individual entity, which allows the service to optimize results (for example, when sending to a device). However, we currently require that the service specify in the metadata url the set of properties returned, and that each entity in the result contain the same set of properties.

      There are times when a particular property is not available to the client (for example, due to permissions), and that permission may vary between different elements of a feed. For example, a manager may be able to see salaries for those reporting to them but not to their peers. It's wrong to report "null" for the salaries of their peers; their peers have a salary, it's just not available to them.

      We could define a "Permissions" term in either core or capabilities vocabularies that could apply to an entity set or property in metadata and could be overwritten in the instance data.

      It is important to do this in V4, so that client know to look for this annotation in the absence of a value for a property. We might want to rationalize this with permissions for update versus readonly in the capabilities vocabulary.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: