fix read ad rules
This commit is contained in:
parent
9ba715860e
commit
2a06eff235
|
@ -3,7 +3,7 @@ package AD.READ
|
||||||
default allow := false
|
default allow := false
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
input.userUuid == input.owner
|
input.owner == input.requester
|
||||||
}
|
}
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
|
|
|
@ -25,6 +25,7 @@ export class AuthorizationController {
|
||||||
@GrpcMethod('AuthorizationService', 'Decide')
|
@GrpcMethod('AuthorizationService', 'Decide')
|
||||||
async decide(data: DecisionRequest): Promise<AuthorizationPresenter> {
|
async decide(data: DecisionRequest): Promise<AuthorizationPresenter> {
|
||||||
try {
|
try {
|
||||||
|
console.log(data);
|
||||||
const authorization: Authorization = await this._queryBus.execute(
|
const authorization: Authorization = await this._queryBus.execute(
|
||||||
new DecisionQuery(data.uuid, data.domain, data.action, data.context),
|
new DecisionQuery(data.uuid, data.domain, data.action, data.context),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export enum Domain {
|
export enum Domain {
|
||||||
USER = 'USER',
|
USER = 'USER',
|
||||||
ADMIN = 'ADMIN',
|
ADMIN = 'ADMIN',
|
||||||
|
AD = 'AD',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue