Hello Isomorphic,
could you please point me to the right location for this use case?
I have an application with many users from different entities. Some may see all fields of a DataSource, some may only see specific fields.
I know about the viewRequires-attribute, but this might not be enough as the Admin of the application can configure who may see what.
Of course, on the client I can decide to show or not to show some fields depending on the application settings. But I also want the data not to be transferred to the client in the first place.
So in my imagination I'm looking for something like
Another use-case would be to set required="true"/"false" on the server depending on the application settings and logged-in user. Here I could do the same with a serverside custom validator, but that would be serverside.
I'm pretty sure that these "dynamic DS" are already possible and straight forward to use, but I did not find the right documentation / sample, yet. Is it somehow related to Interface DynamicDSGenerator?
Thank you & Best regards,
Blama
could you please point me to the right location for this use case?
I have an application with many users from different entities. Some may see all fields of a DataSource, some may only see specific fields.
I know about the viewRequires-attribute, but this might not be enough as the Admin of the application can configure who may see what.
Of course, on the client I can decide to show or not to show some fields depending on the application settings. But I also want the data not to be transferred to the client in the first place.
So in my imagination I'm looking for something like
- .ds.xml-file with all possible fields and their default-configuration with a serverConstructor set to a SQLDataSource subclass I write.
- In that class some DSRequests to get my application configuration and some if-statements remove fields / set field-properties depending on the current user I get from the session and the result of the settings-DSRequests.
- On the Client, the DataSource-definitions returned by sc/DataSourceLoader will or will not have the fields depending on the configuration.
- Fetches from the client will never include hidden data, as the DS is recreated on the server for every client request.
- Updates from the client will never be able to write to hidden fields as the DS is recreated on the server and does not include the fields hidden for that user, so the server will ignore that data (if the user manages to sneak in data for a field he or she can't see).
Another use-case would be to set required="true"/"false" on the server depending on the application settings and logged-in user. Here I could do the same with a serverside custom validator, but that would be serverside.
I'm pretty sure that these "dynamic DS" are already possible and straight forward to use, but I did not find the right documentation / sample, yet. Is it somehow related to Interface DynamicDSGenerator?
Thank you & Best regards,
Blama
Comment