Hi!
I'll try to describe my problem,
It's a bit complicated to explain, but I'll try.
I have an XData server that has several Service Operations + CRUD access:
ILoginService - used to login an get the JWT that will be used for other services. Based on the login, the user gets two different scopes "easy" (for the app) and "webshop" (for the IWebShopService)
IWebShopService - for webshop access - only a few functions. User must have the "webshop" scope
IEasyService - for operations acces - only for scope "easy".
I also want to have direct CRUD access (only List and Get) for my own applications (scope must be "easy"). I've set the XDataServer.DefaultEntitySetPermissions to [List,Get]. So CRUD must be visible only to logged users with the "easy" scope.
The login and JWT works OK, I marked the IWebShopService like this
[ServiceContract]
[Authorize]
[AuthorizeScopes('webshop')]
IWebShopService = interface(IProtectedService)
so it's reachable only for users with the correct scope.
The problem is that I can't manage to get the CRUD functions only to the "easy" scope.
My entities are marked like this
[Entity]
[EntityAuthorizeScopes('easy', EntitySetPermissionsAll]
[Table('users')]
[Id('FLogin', TIdGenerator.None)]
TUser = class
...
But even if correctly logged (withe the "easy" scope) I get 403 (forbidden).
Any hint what I'm doing wrong..?