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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:57:49+00:00 2026-05-27T09:57:49+00:00

I could be wrong about this, but it is my understanding that it is

  • 0

I could be wrong about this, but it is my understanding that it is a very common practice to handle permissions like so:

  1. The user goes to the login page and provides a username and password.

  2. The username and password are verified. If valid, the user’s information (including permissions) is set to a session variable.

  3. As the logged in user navigates the site, certain features are available to the user based on their permissions, which are referenced in the session.

This makes sense since it would be impractical to frequently query the database for the user’s permissions. However, from a security standpoint, I’m not sure what the best approach is. A simple example would be if you were to remove a certain permission from a user while they’re logged in. An extreme example would be if you were to mark a user account as inactive while they’re logged in. I don’t know how you could get that user’s web browser to know about the change other than to code database permission checks (as opposed to session permission checks) into every part of the website. Again, that seems like overkill, but is that really the only way if you want a secure website?

Thanks!

  • 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-27T09:57:50+00:00Added an answer on May 27, 2026 at 9:57 am

    I believe you’ve got it stated correctly:

    I don’t know how you could get that user’s web browser to know about the change other than to code database permission checks (as opposed to session permission checks) into every part of the website.

    Depending upon how your site is designed, it might make sense to invalidate the user’s session when you perform drastic enough modifications to the user’s privileges. Deleting sessions mean the user will be faced with a new request to log in, but if you’ve just disabled their account or severely downgraded their privileges, that might be acceptable.

    But you wouldn’t want to invalidate the session for every little thing and certainly not for almost any permission enhancement operations.

    If you expire all sessions N seconds after the last authentication you can place an upper limit on the amount of time that your application code would grant permissions that have actually been revoked. This might be suitable when the stakes are not very high anyway.

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

Sidebar

Related Questions

I know this could be a very long topic and endless, but because I'm
Maybe I'm going about this wrong, but I'm hoping I can get some insight.
I'm probably going about this all wrong but... I am trying to populate a
I am not sure what I could be doing wrong that causes info level
Could someone explain what I am doing wrong with my classes that my JTabbedPane
I could be not more sorry guys - the question was a very wrong
I was wondering if someone could tell me what I am doing wrong that
For years I've been following a great pattern called Target-Action which goes like this:
Shark complains about a big performance hit with this line, which takes like 80%
I'm not understanding some key bit of ExtJs idiom so this question is about

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.