I have a question about the example on declarative security of the quick guide:
<operationBinding operationType="fetch">
<criteria fieldName="deleted" value="false"/>
</operationBinding>
<operationBinding operationType="fetch" operationId="adminSearch"
requiresRole="admin"/>
How does the component choose which fetch operation to use ?
I tried the example and it always shows me the default fetch operation, no matter if the user has the role "admin" or not.
Is it necessary to tell the component which fetch operation to use?
For example:
if isAdmin() { use adminSearch } else { use default }?
If not, why am I always getting the default operation? The user I am testing with has definitely admin rights: I tested with <DataSource requiresAuthorization="true" requiresRole="admin" ... and it shows me the datasource correctly. For users without the admin role I get an error, which is the correct behaviour. So what is the problem?
<operationBinding operationType="fetch">
<criteria fieldName="deleted" value="false"/>
</operationBinding>
<operationBinding operationType="fetch" operationId="adminSearch"
requiresRole="admin"/>
How does the component choose which fetch operation to use ?
I tried the example and it always shows me the default fetch operation, no matter if the user has the role "admin" or not.
Is it necessary to tell the component which fetch operation to use?
For example:
if isAdmin() { use adminSearch } else { use default }?
If not, why am I always getting the default operation? The user I am testing with has definitely admin rights: I tested with <DataSource requiresAuthorization="true" requiresRole="admin" ... and it shows me the datasource correctly. For users without the admin role I get an error, which is the correct behaviour. So what is the problem?
Comment