For now you can only set view permissions by page. So if you have a role named friends and you have content that only friends should be able to see, you must put it on a page that is only visible to friends.
In the near future we wil add view permissions at the content instance level, sometime within the next few releases.
Hope it helps,
Joe
ps about Medium Trust, its basically a security policy that limits what your code is allowed to do and many hosting companies enforce it, see the documentation, there are links at the bottom to learn more about medium trust from the Microsoft documentation. Please remember to start a new thread when you have a new question.