fase(9): auth module with casl rbac and session management
This commit is contained in:
12
dist/modules/auth/domain/value-objects/Permission.js
vendored
Normal file
12
dist/modules/auth/domain/value-objects/Permission.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Permission = void 0;
|
||||
const ValueObject_1 = require("../../../../shared/domain/ValueObject");
|
||||
class Permission extends ValueObject_1.ValueObject {
|
||||
static create(action, subject) {
|
||||
return new Permission({ action, subject });
|
||||
}
|
||||
get action() { return this.props.action; }
|
||||
get subject() { return this.props.subject; }
|
||||
}
|
||||
exports.Permission = Permission;
|
||||
Reference in New Issue
Block a user