Just been playing some with the Enterprise Library Security Application Block. I was very interested in the Roles based Rule checking which allowed you to select a RuleProvider and authorize a principle against a paticular rule. These rules are based on expressions which can contain Role-based and Username-based rules.
These things come in very handy when you want to check to see whether the user can 'Submit a document' or 'Download a document' etc.
The rules can be created in the Configuration manager or point to an external source. You can have multiple RuleProvider's and for instance in a dev environment point to the config file and in the live environment point to a dynamic provider etc.
Having this much control over sources of data etc. for different environments allows huge amounts of control over testing or troubleshooting your code! With all the wrappers around all the application blocks too, the code is so slick it looks too easy! Thumbs up boys!
Now what application block should I write...?