Created
July 9, 2011 02:05
-
-
Save RexMorgan/1073216 to your computer and use it in GitHub Desktop.
FubuMVC Authorization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Services(x => | |
{ | |
x.ReplaceService<IAuthorizationFailureHandler, CustomAuthorizationFailureHandler>(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IPostModel | |
{ | |
int PostId { get; } | |
} | |
public class EditPostInputModel : IPostModel | |
{ | |
public int PostId { get; set; } | |
public string Title { get; set; } | |
public string Body { get; set; } | |
public string Slug { get; set; } | |
} | |
public class EditPostRequestModel : IPostModel | |
{ | |
public int PostId { get; set; } | |
public string Title { get; set; } | |
public string Body { get; set; } | |
public string Slug { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Policies.Add<PostAuthorizationConvention>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment