Does anyone have any thoughts on this? I was thinking about just starting a new process every time I access the API and then store the current user in there. Any thoughts?<div><br>Thanks again!<br><br><div class="gmail_quote">
On Sat, May 19, 2012 at 12:38 PM, Andrew Berman <span dir="ltr"><<a href="mailto:rexxe98@gmail.com" target="_blank">rexxe98@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey all,<div><br></div><div>I'm trying to mimic (as much as I can) what JEE 6 does with security on domain objects. Essentially what I'd like to do is create an annotation using Tim's awesome annotation code (<a href="https://github.com/hyperthunk/annotations" target="_blank">https://github.com/hyperthunk/annotations</a>) and test on a user's roles. The one issue I'm wrestling with is how to get the user into the annotation. The obvious way is to have every function I put the annotation on take in a user record and then loop through the arguments of the function looking for the user record. That way doesn't seem very elegant to me, though. I really want to just say something like User = get_current_user(...). Has anyone tackled this sort of issue or have any advice on how to handle it in an Erlang safe manner?</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Andrew</div>
</blockquote></div><br></div>