I worked around by making GetPermissionQueryInternal method public:
var docs = session.CreateCriteria<Document>().CreateAlias("Category",
"category");
var crit = Add<Category>(docs, "category", "/SomeOperation");
public void Add<TRef>(ICriteria crit, string path, string op)
{
crit.Add(AuthorizationService.GetPermissionQueryInternal(currentUser,
op, path + "." + Security.GetSecurityKeyProperty(typeof(TRef))));
}
Is there a way without modifying Rhino Security?
Thanks!
On 23 сен, 00:12, Vadim Kantorov <[email protected]> wrote:
> Hi,
> I'm querying documents. Document has a Category.
> A logged in user can have permissions on some categories.
>
> Thus I want to restrict documents so that the logged in user has
> access to the category of a document.
>
> I have a faint idea that i have to use detached queries to make such a
> constraint.
>
> ICriteria allDocuments = session.CreateCriteria<Document>();
> authz.AddPermissionsToQuery(currentUser, "/SomeOperation", SOMETHING);
>
> How do I do that with RS?
>
> Thanks,
> Vadim
--
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en.