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

  • Home
  • SEARCH
  • 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 83411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:46:10+00:00 2026-05-10T21:46:10+00:00

I have only recently started working with the MVC approach, so I suppose this

  • 0

I have only recently started working with the MVC approach, so I suppose this is an easy one for you gurus here:

Where do I put access control?

  1. In a view? I don’t want to have any logic besides switches and flags in my templates, so that sounds like the least viable option
  2. In the model? Should each business object decide what data it will reveal about itself based on who’s asking?
  3. In the controller? That’s where I have it now but it makes it hard to keep business rules consistent

Or is there another option?

  • 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. 2026-05-10T21:46:10+00:00Added an answer on May 10, 2026 at 9:46 pm

    This will depend on what framework you’re using as that and the language will dictate a lot of the tools you have available to you.

    From a high level, you should have access security configured at points-of-entry. And you should double-check access security at every level that could be considered autonomous or reused from multiple parts of your application (who knows if security was checked by your co-worker’s portal that uses your logic layer? etc.). The other thing to worry about is data security, and that belongs as close to your data as possible (so, yes to your #2 above, but understand that it’s separate).

    This is akin to the difference between application logic and domain logic, which I’m fond of talking about. If there is any logic that is specific to one particular application (web app compared to a windows service, or whatever) then that logic should be defined in that application only. If some logic crosses the boundary between applications (is reusable between applications) then it qualifies as domain logic and should be defined in your model. Your applications can make use of domain logic, but they should not own it.

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

Sidebar

Related Questions

I honestly have only started recently researching this so my knowledge is limited. I
I have only recently started using CakePHP and have been unable to get validation
I have only recently been introduced to curl and am working on a certain
I have recently started working on my master thesis in C that I haven't
I have a project that I have recently started working on seriously but had
I have recently just started working with Lucene (specifically, Lucene.Net) and have successfully created
I'm very used to working in WPF, but I have recently started building websites
I recently started getting this error while running gems or bundler. The only thing
Recently I started working with MVC, before that I used classic ASP.NET. After using
I am quite new to the Entity Framework, and only have recently started looking

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.