SAP-samples/cloud-cap-samples

Annotation with absolute path

ghiblin opened this issue · 1 comments

Fiori Elements does not support native user authorization, so I created an OData Singleton with odata singleton annotation.

<Singleton Name="Auth" Type="AdminService.Auth"/>

I'd like to use Capabilities annotiations to hide and show CRUD buttons on List Report/Object pages, as I can config the annotation to use an absolute value

<Annotation Term="Capabilities.DeleteRestrictions">
    <Record Type="Capabilities.DeleteRestrictionsType">
        <PropertyValue Property="Deletable" Bool="false"/>
    </Record>
</Annotation>

or I can use a path

<Annotation Term="Capabilities.DeleteRestrictions">
    <Record Type="Capabilities.DeleteRestrictionsType">
        <PropertyValue Property="Deletable" Path="isDelatable"/>
    </Record>
</Annotation>

I'd like to combine the two solution:

<Annotation Term="Capabilities.DeleteRestrictions">
    <Record Type="Capabilities.DeleteRestrictionsType">
        <PropertyValue Property="Deletable" Path="/Auth/canDelete"/>
    </Record>
</Annotation>

Is this possible with cds?

Thank you and Best Regards

chgeo commented

Hey.. we have moved the support channel to the SAP Community. Please file your question there.