fix read ad rules

This commit is contained in:
sbriat 2023-05-04 15:54:50 +02:00
parent 9ba715860e
commit 2a06eff235
3 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,7 @@ package AD.READ
default allow := false
allow {
input.userUuid == input.owner
input.owner == input.requester
}
allow {

View File

@ -25,6 +25,7 @@ export class AuthorizationController {
@GrpcMethod('AuthorizationService', 'Decide')
async decide(data: DecisionRequest): Promise<AuthorizationPresenter> {
try {
console.log(data);
const authorization: Authorization = await this._queryBus.execute(
new DecisionQuery(data.uuid, data.domain, data.action, data.context),
);

View File

@ -1,4 +1,5 @@
export enum Domain {
USER = 'USER',
ADMIN = 'ADMIN',
AD = 'AD',
}