Hi Isomorphic,
I just started using viewRequiresRole for a new use case, where a customer of mine wants to see some data, others do not want to be seen in the GUI (or even transferred to the client). I'm using v10.1p_2017-07-04/PowerEdition.
My expection is that there is a different XML returned from DataSourceLoader depending on the roles returned on login by j_security_check / Form-Based Authentication. This is happening:
My 2nd expectation is that in case of viewRequiresRole="false" the column is never present in DSResponses. This is not the case.
See this screenshot:
My expectation comes from this Quick Start Guide excerpt:
I'm using v10.1p_2017-07-04 with Tomcat 8.
Best regards
Blama
I just started using viewRequiresRole for a new use case, where a customer of mine wants to see some data, others do not want to be seen in the GUI (or even transferred to the client). I'm using v10.1p_2017-07-04/PowerEdition.
My expection is that there is a different XML returned from DataSourceLoader depending on the roles returned on login by j_security_check / Form-Based Authentication. This is happening:
Code:
[B].ds.xml (using some [I]nativeName[/I] because I did not add the actual column to the view, yet):[/B] <field name="CUSTNAME" type="integer" nativeName="MD_LEADTEMPERATURE_NAME" viewRequiresRole="pickLead"> <title><fmt:message key="leadTemperature" /></title> </field> [B]Result for the field in the DataSourceLoader for a user with "pickLead":[/B] {name:"CUSTNAME",nativeName:"MD_LEADTEMPERATURE_NAME",type:"integer",title:"Leadtemperatur",validators:[]}, [B]Result for the field in the DataSourceLoader for the same user after changing viewRequiresRole to"false" (which the user does not have):[/B] {canView:false,name:"CUSTNAME"}
See this screenshot:
My expectation comes from this Quick Start Guide excerpt:
PDF page 70:
Similarly, the viewRequiresRole attribute will cause DataBound Components to avoiding showing the field at all, and values for the field will be automatically omitted from server responses. This behavior is automatic even if you build a custom DataSource or write DMI logic that returns data for the field, so it can be used regardless of how persistence is implemented.
Similarly, the viewRequiresRole attribute will cause DataBound Components to avoiding showing the field at all, and values for the field will be automatically omitted from server responses. This behavior is automatic even if you build a custom DataSource or write DMI logic that returns data for the field, so it can be used regardless of how persistence is implemented.
Best regards
Blama
Comment