Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
RavenDB Queries - Cross cutting concerns
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
racielrod  
View profile  
 More options Jun 1 2012, 12:22 pm
From: racielrod <raciel.rodrig...@gmail.com>
Date: Fri, 1 Jun 2012 09:22:31 -0700 (PDT)
Local: Fri, Jun 1 2012 12:22 pm
Subject: RavenDB Queries - Cross cutting concerns
Hello,

I need to make sure certain constrains are applied to all my queries:

1) Every user in the system can see certain clients only, so every
query should only return documents for those clients.
2) Every user is in a role, if you are in the lowest role you can only
see the documents you created/

In the very first stage of this project I implemented this by using
the repository pattern and made sure this concerns were handled in the
base repository.
I had an horrible experience with this pattern and the worst part
about sharing this base queries is the impossibility of using specific
indexes if your queries are built upon this base queries.

So the question is, what is the best practice to deal with this cross
cutting concerns?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Warren  
View profile  
 More options Jun 1 2012, 3:25 pm
From: Matt Warren <mattd...@gmail.com>
Date: Fri, 1 Jun 2012 12:25:52 -0700 (PDT)
Local: Fri, Jun 1 2012 3:25 pm
Subject: Re: RavenDB Queries - Cross cutting concerns

Take a look at the Authorization bundle, it should handle these scenarios
for you, see:

http://ravendb.net/docs/server/bundles/authorization
http://ravendb.net/docs/server/bundles/authorization-bundle-design


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codingvi...@googlemail.com  
View profile  
 More options Jun 1 2012, 3:35 pm
From: codingvi...@googlemail.com
Date: Fri, 1 Jun 2012 20:35:01 +0100
Local: Fri, Jun 1 2012 3:35 pm
Subject: Re: [RavenDB] RavenDB Queries - Cross cutting concerns
Check out the bundles. There's one there which exactly fits your needs :)

Sent from my iPhone

On 1 Jun 2012, at 17:22, racielrod <raciel.rodrig...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
racielrod  
View profile  
 More options Jun 1 2012, 3:45 pm
From: racielrod <raciel.rodrig...@gmail.com>
Date: Fri, 1 Jun 2012 12:45:17 -0700 (PDT)
Local: Fri, Jun 1 2012 3:45 pm
Subject: Re: RavenDB Queries - Cross cutting concerns

Thanks Matt,

While this would be a great fix for the scenario I described above I'm more
interested on addressing common query concerns w/o having to repeat them
over and over again.
In order to walk away of the authorization context I put as an example
above, let's use another examples:

What if a set of pre-conditions are part of certain group of queries. For
instance, for certain department they only need to deal with documents with
the following characteristics:

1) Users are older than 18 yo.
2) Females.
3) Approved.
4) Living on certain area: state, city, etc...
...
n)...

What if you have several queries that use those pre-conditions; I don't
want to repeat over and over the where clauses in my queries.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 1 2012, 7:12 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Sat, 2 Jun 2012 02:12:26 +0300
Local: Fri, Jun 1 2012 7:12 pm
Subject: Re: [RavenDB] Re: RavenDB Queries - Cross cutting concerns

Raciel,
You have IDocumentQueryListener, which allows you to modify each query
before it is actually executed.

On Fri, Jun 1, 2012 at 10:45 PM, racielrod <raciel.rodrig...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
racielrod  
View profile  
 More options Jun 2 2012, 3:54 pm
From: racielrod <raciel.rodrig...@gmail.com>
Date: Sat, 2 Jun 2012 12:54:09 -0700 (PDT)
Local: Sat, Jun 2 2012 3:54 pm
Subject: Re: [RavenDB] Re: RavenDB Queries - Cross cutting concerns

Thanks, I'm going to take a look at this...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »