I have a datasource defined as follows:
<DataSource ID="someSource" ....>
<fields>
...
</fields>
<serverObject className="xxx.AuthorizationDMI" methodName="enforceUserAccess" />
<operationBindings>
<operationBinding operationId="takeSnapshot" operationType="custom"
<serverObject className="xxx.CustomDMI" method="takeSnapshot" />
</operationBinding>
<operationBinding operationId="restoreFromSnapshot" operationType="custom"
<serverObject className="xxx.CustomDMI" method="restoreSnapshot" />
</operationBinding>
....
<operationBindings>
The objective is to have all operations go through the server object AuthorizationDMI's enforceUserAccess method, and deny access if the user does not have the appropriate permission to operate on the datasource.
Everything works, except enforceUserAccess() is only called on the custom operation 'takeSnapshot', but not 'restoreFromSnapshot'.
My understanding is all operations, either default or custom, should go through the serverObject 'AuthorizationDMI' when it is defined in the scope as listed above. Any idea why it is not triggered all the time?
<DataSource ID="someSource" ....>
<fields>
...
</fields>
<serverObject className="xxx.AuthorizationDMI" methodName="enforceUserAccess" />
<operationBindings>
<operationBinding operationId="takeSnapshot" operationType="custom"
<serverObject className="xxx.CustomDMI" method="takeSnapshot" />
</operationBinding>
<operationBinding operationId="restoreFromSnapshot" operationType="custom"
<serverObject className="xxx.CustomDMI" method="restoreSnapshot" />
</operationBinding>
....
<operationBindings>
The objective is to have all operations go through the server object AuthorizationDMI's enforceUserAccess method, and deny access if the user does not have the appropriate permission to operate on the datasource.
Everything works, except enforceUserAccess() is only called on the custom operation 'takeSnapshot', but not 'restoreFromSnapshot'.
My understanding is all operations, either default or custom, should go through the serverObject 'AuthorizationDMI' when it is defined in the scope as listed above. Any idea why it is not triggered all the time?
Comment