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 7128597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:09:18+00:00 2026-05-28T11:09:18+00:00

Is it advised or redundant to set permissions on the template AND the view?

  • 0

Is it advised or redundant to set permissions on the template AND the view?

Consider that any data manipulation to the DB is done through POST

if the following enough for permissions?

{% if perms.system.view_employee %}
     <!-- content here -->
{% else %}
     <h1>Sorry you do not have permission to access this page<h2>
{% endif %}

or should I also implement server side checking as well (is it redundant to do so or necessary)?

def my_view(request):
    if not request.user.has_perm('polls.can_vote'):
        return HttpResponse("You can't access this page")
    else:
        # do stuff
        ...
  • 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-28T11:09:19+00:00Added an answer on May 28, 2026 at 11:09 am
    1. Checks in the template are server side.
    2. Permissions checks in the template and in the view do not have the same purpose:

      • Checking permissions on the view will disallow the access to the entire page. You do this when this page, and the featured it embeds, is for APO. You handle ressources access.
      • Checking permissions in the template disallow parts of the template to be displayed. You do this when you want people to be able to access the page, but there are some stuff you don’t want them to see on the page. You handle display.

    In your particular example, you must set the permissions checks on the view to dissallow anybody to do this manipulation. Usually, if the views is accessed using POST their are little chances you want template permission checks because POST requests are actions by essence.

    You usually will want template permissions checks if you:

    • have some parts of the page the person is not allowed to see (like sensitive data)
    • want to improve usability to show elements (menu, forms, etc) that are relevant only to its level of permission. Indeed it’s useless to display a link to the admin in the menu if the person doesn’t have the right to access the admin.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

People always advised me that if I am doing some application that should use
My understanding is that it's advised testers are separate from developers, i.e you obviously
In this superuser question I was advised that it is better to execute scripts
I've read that its bad (not advised) to use User Agent Sniffing to send
I looked at the post jQuery: Loop iterating through numbered selectors? and it didn't
I was advised a while ago that is was common place to use std::vector
I have recently been advised that for my current rails app relationships I should
I have been advised to use the following options with GCC, as it helps
I have been advised that having expose_php = On in my php.ini is a
I heard that its not advised to use % in the beginning of LIKE

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.