2 ms·
Consider an "add user to thread" function. Only participating users can add other members. First, how would I do authentication/authorization with Brainy? Secon
by CGamesPlay 13y ago
Consider an "add user to thread" function. Only participating users can add other members. First, how would I do authentication/authorization with Brainy? Second, the easiest way to enforce the existing member relationship is to have a method that validates an "add user" function call and then performs the action. With a single "validate" method, you need to know the old values and the new values and compute the delta. Does Brainy support that?
As far as collections, pretend a user can only see threads for which he is a member. Can that be enforced with Brainy? It could be if the queries were well-defined methods that produced query strings and were executed on the server.
I ask about all this because I'm basically implementing it manually in my current project, and it would be neat to have something reusable at the end of these efforts.
- catshirt 13y agoi'm currently doing this with a session model. and i override my model save/fetch to validate the session before performing some operation. it's not packaged because i'm hesitant to include any client-specific code (yet) and i'm not sure it's any sort of secure. if you open an issue on the project i'll remember to respond with more detail.