jinaga
Version:
Data management for web and mobile applications.
41 lines • 1.8 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthorizationNoOp = void 0;
const authorization_engine_1 = require("./authorization-engine");
class AuthorizationNoOp {
constructor(factManager, store) {
this.factManager = factManager;
this.store = store;
}
getOrCreateUserFact(userIdentity) {
throw new authorization_engine_1.Forbidden();
}
read(userIdentity, start, specification) {
return this.factManager.read(start, specification);
}
load(userIdentity, references) {
return this.factManager.load(references);
}
feed(userIdentity, specification, start, bookmark) {
return this.store.feed(specification, start, bookmark);
}
save(userIdentity, envelopes) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.factManager.save(envelopes);
});
}
verifyDistribution(userIdentity, feeds, namedStart) {
return Promise.resolve();
}
}
exports.AuthorizationNoOp = AuthorizationNoOp;
//# sourceMappingURL=authorization-noop.js.map