Hi
I've just started with DevForce, so maybe my lack of experience is the cause of misunderstanding.
I am trying to use declarative [RequiresRoles] in my class:
[RequiresRoles("admin")]
public class EntityServerQueryManager : EntityServerQueryInterceptor {
}
My web.config configuration:
<objectServer>
<serverSettings useAspNetSecurityServices="true" allowAnonymousLogin="true" loginManagerRequired="true" />
</objectServer>
...
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
Next I try fetch data (without login) and fill my datagrid.
I expect some exception (PersistenceSecurityException) but my datagrid show all records - Why ?
Principal is not authenticated and roles are empty.
When I change my class to identical (page 382 DeveloperGuide) :
public class EntityServerQueryManager : EntityServerQueryInterceptor {
protected override bool AuthorizeQuery() {
return Principal.IsInRole("admin");
}
}
I receive correct message about cancel operation.
I've tried with RequiresAuthentication also but I can still get data.
My DF version is 6.0.9
Kind regards
Andrzej