UNPKG

propylons-client

Version:
27 lines 803 B
"use strict"; /*! * Propylons * Copyright(c) 2022 Xavier Raffin * MIT Licensed */ Object.defineProperty(exports, "__esModule", { value: true }); exports.can = void 0; /** * Permission check main function. * The method will throw if the type is not the expected one. * * @param actionName The action permission type * @param token The token to check permission for (can be from API key or user) * @param context the ownership context * @returns whether the action is allowed for given user and dataForAction */ function can(actionName, token, context) { // Return false if unauthenticated if (token === undefined || context === undefined) { return false; } // TODO: Implementation return true; } exports.can = can; //# sourceMappingURL=PermissionsEvaluators.js.map