Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Group Policies in Class. Feature Request. #46

Closed
mdmoura opened this Issue · 6 comments

2 participants

@mdmoura

Hello,

This is a feature request. Fluent Security is configured as follows:

configuration.For<HomeController>().Ignore();
configuration.For<AccountController>().DenyAuthenticatedAccess();

Wouldn't be possible to have an option to group policies. Something like:

configuration.AddPolicyProvider<PolicyProvider>();
configuration.AddPolicyProvider<CMSPolicyProvider>();

For example CMSPolicyProvider would be something as:

public class CMSPolicyProvider : FluentSecuriyProvider {
  public CMSPolicyProvider() {
     configuration.For<Areas.Controllers.PostController>().DenyAnonymousAccess();
  } // CMSPolicyProvider
}

This would allow to have some portability on the Policy rules.

May other projects offer this alternative: AutoMapper, AttributeRouting, etc.

What do you think?

Thank You,
Miguel

@kristofferahl

Hi Miguel,
Thanks for getting involved! You'll be happy to learn that this is a feature already in progress. I'm calling the concept Profiles. I wrote a SPIKE for it a few months back and I will be tackling this feature next. I'll be sure to include you in the discussions and it would be great if you would be willing to try it out once I have something to show!?

Here's what I've got so far:
https://github.com/kristofferahl/FluentSecurity/blob/spike-profile/FluentSecurity.SampleApplication/Bootstrapper.cs

I'll keep you up to date.

/ Kristoffer

@mdmoura

Yes, Profile is a good naming for it. From your code it looks exactly what I was talking about.

I am just wrapping the new version of a MVC CMS I develop and I was considering including FluentSecurity.

I decided to include FS in next CMS version since it FS 2.0.0 will have all these new features.

Thank You,
Miguel

@mdmoura mdmoura closed this
@mdmoura mdmoura reopened this
@kristofferahl

That's great. Feel free to ping me anytime you need help, Your feedback is really valuable! What's the name of the CMS?

@mdmoura

The CMS is called Blom ... Still on the final tests. Probably I will use FluenSecurity in the begining fo next year.

I am keeping a CMS version with FluentSecurity for testing ... I will post here any issues I find.

Congrats for FS. It is a really good tool.

Thanks,
Miguel

@kristofferahl

Hi Miguel!
Just a quick one to let you know that this feature has been implemented and will be part of the next alpha release.
If you can't wait you can grab the latest nightly build (v2.0.0-alpha3-build5) from our MyGet feed found here:
http://www.myget.org/gallery/fluentsecurity

Here are the docs that's been written so far:
https://github.com/kristofferahl/FluentSecurity/wiki/Profiles

@kristofferahl

Miguel,
Just posting to let you know that I just released FluentSecurity 2.0 and it is now available on nuget.org.
I'm closing this issue. Thanks again for getting involved!
/ Kristoffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.