Question regarding dynamic access/authorisation/rules

Question regarding dynamic access/authorisation/rules

Old forum URL:

lee_b posted on Monday, March 08, 2010

Hi, I am very new to CSLA and have a couple of question regarding the capabilities of the rules and authorisations.

I want to make a data system for a clinical practice (using C#, .NET 4 and CSLA 4) and I will be getting into situations where information access or user permissions will depend on a combination of roles, rules and authorisation privileges.

My main issue is that the handling of each situation should be highly user configurable and very dynamic. Here are a couple of scenarios.

Say, for example, there is a Doctor filling out a clinical form for a General Health Assessment (height, weight, body mass index, blood pressure, things like that).

Now, say I want to attach a default rule to the blood pressure in that if the measurement is over 180/120, I want a process to be followed, like import further questions about diet and exercise, or send an email to a [Specific or preset] Dietician. However a specific Doctor may want to have a different process triggered, and only if the Patient that the information refers to has specific properties (such as '(Patient is over [age x] AND not diabetic) OR Body Mass Index is over [value]' where [values] are recorded in other question fields). Each doctor potentially will want to be able configure properties and/or their values for individual cases.

Another scenario is around who can see what information. In the situation of an AIDS test (or STD's in general), by default if a doctor fills in a form for an AIDS test, then it should be hidden from everyone else. Not just the results of the test (whether positive or negative) but the fact that a test was actually requested.

Now, the doctor may want to share the information with all the doctors, but not the nurses, or only one or two other specific doctors and a specific nurse (perhaps the one that will be drawing the blood for the test), or only doctors that are of a specific type (say, Family Planning and/or General Practioners - potentially there are many dozens of roles that the user may be or interact with, dependant on their own roles, or users may fill multiple roles, and the list of roles will need to be dynamically expanded and different specialties arrive or arise).

So my questions are:

Is this (readily) possible in CSLA? If so, what functions/areas of CSLA should I be looking at around this.

Has anyone else had to deal with highly-user-configurable, dynamic scenarios? Any examples or advice?

Many Thanks,


Fintanv replied on Tuesday, March 09, 2010

If you do a search you will find several threads that deal with dynamic rules.  I have implemented these in an application using the Instance Rules.  One trick is being able to clear the rules; you can see my solution to this problem here:

lee_b replied on Tuesday, March 09, 2010

Cheers Fintanv, that looks very promising!

Copyright (c) Marimer LLC