Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5976507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:14:20+00:00 2026-05-22T21:14:20+00:00

I have a web application written in asp.net mvc with fluent nhibernate. Data hierarchy:

  • 0

I have a web application written in asp.net mvc with fluent nhibernate.

Data hierarchy: Post -> Category ->
Company

User roles : user, admin

I try to find a architecture to develop custom authorization. A user can be member of multiple company. Also a user can be an admin of a company while he can be also just member of another company.

Also we want develop a custom authorization based on controller, action or id of action. For example a user can be admin of just one category.
Namely; in our future system there will be users, user groups in which users and groups is belong to a company. While custom authorization will be applied to them based on url (contoller/action/id).

any recommendation, useful links etc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:14:20+00:00Added an answer on May 22, 2026 at 9:14 pm

    This is a bit tricky actually – you may want to rethink the custom authorization and consider populating the roles in say Application_AuthenticateRequest, and then use the [Authorize] attribute to do the actual checks if the user belongs to those roles.This way you are applying it directly to the action method and avoiding a custom mess but achieving basically the same result.

    we are having a similar discussion not yet resolved at:
    Questions about a Custom Security setup for MVC3 using overridden AuthorizeAttribute, thread safety, ChildActions and caching

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a web application written by ASP.NET MVC. Now I want to
I have a forum like web application written in Asp.net MVC. I'm trying to
I have written a simple ASP.NET MVC 2 application that stores data and can
I have a web-application written on ASP.NET MVC 3. On client side I used
I have a web application written in ASP.NET MVC 3 . This application have
I have a web application written in ASP .NET MVC 3. I'm using ACS
I have written an ASP.NET MVC application that allows the user to specify their
We have written Web application using ASP.NET MVC, which will be hosted in our
I have in here an old web application written in ASP.Net 2.0 + AJAX.
I have an asp.net web application written in C# using a SQL Server 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.