UNPKG

rxdb-server

Version:
37 lines (33 loc) 799 B
"use strict"; /** * Returns the auth state by the given request headers. * Throws if auth not valid. */ /** * Modifies a given query in a way to limit the results * to what the authenticated user is allowed to see. * For example the query selector * input: { * selector: { * myField: { $gt: 100 } * } * } * could be modified to restrict the results to only return * documents that are "owned" by the user * return: { * selector: { * myField: { $gt: 100 }, * userId: { $eq: authData.userId } * } * } * * */ /** * Validates if a given change is allowed to be performed on the server. * Returns true if allowed, false if not. * If a client tries to make a non-allowed change, * the client will be disconnected. */ ; //# sourceMappingURL=types.js.map