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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:38:59+00:00 2026-05-27T20:38:59+00:00

A logical stuck point. I am building a simple ACL, and I am just

  • 0

A logical stuck point. I am building a simple ACL, and I am just confused. I am just trying to do this the right way.

Take a example of a simple model based ACL.

A table of managing users tbl_user

id | userid |
-------------
1  | nabin  |
2  | suman  |

Another table for managing groups tbl_group

id | groupname |
-----------------
1  | admin     |
2  | member    |
3  | editor    |
4  | moderator |

Another table for maintaining groups and users. tbl_roles

id | userid | groupid
-----------------------
1  | 1      | 1
2  | 1      | 2
3  | 2      | 2
4  | 2      | 3
5  | 2      | 4

Now a table for managing the access tbl_acl

id | groupid | appresourceid
----------------------------
1  | 3       | 1

On this table, I will store the deny list, cause deny list will definitely be shorter than the access list.

Now, according to the example groupid:3 (editor), has been denied to the resource 1(suppose this is the administration area).

But, if you take userid: 2(suman), then he is a both editor and moderator. As per the rule of tbl_acl, editor should be denied, where as moderator should be allowed.

Should he be allowed to access the resource or should be denied? Allowed FIRST or Denied FIRST. Which should be prioritized?

Some ways of looking into this

  1. Although the user is denied as a editor, he as a moderator is allowed to access the area.
  2. Even though, moderator is allowed to access the resource, all the editors are restricted.
  3. Not to forget that the user is a member too. So if we are prioritizing the allow over the deny. Member will have access as an moderator. Unless, member are blocked too


P.S.
I am well aware of this topic being debatable. So, facts would be appreciated (not saying don’t) over opinions and guesses.

  • 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-27T20:39:00+00:00Added an answer on May 27, 2026 at 8:39 pm

    You are encountering this dilemma because you have adopted the rather non-standard approach of allowing access to resources by default. The far more standard approach is to prevent access by default, grant access via one or more “allow” ACL entries, and override any “allow” entries via even a single “deny” entry. Under this approach, any given “deny” entry trumps all “allow” entries. (i.e.: The application should look for denies first and, if it finds any, it doesn’t even need to check for allows.)

    If you need convincing that the “prevent by default” is a better model than “allow by default”, here are a few major differences:

    1. It is generally a better fit for the mental model of permissions
      management held by most permission administrators, whether they be
      IT staff or business-role application administrators. (Granted,
      this is at least partly due to the fact that most other systems they
      will have administered use this model, but that doesn’t make it any
      less relevant.)

    2. Human error is less likely to result in inappropriate granting of a
      permission. (i.e.: If the administrator forgets to add an “allow”
      entry under prevent-by-default, no user ends up being able to access
      resources that he should not have been able to touch.)

    3. When a new permission is added to the system, nobody without special
      admin rights can access the target resource(s) until explicit
      “allow” entries are added.

    #3 is particularly compelling. Imagine you deploy a new version of an HR application with a new “view salaries” permission. Would you find it acceptable to allow all users to be granted this permission until someone gets around to adding “deny” entries to your ACLs?

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

Sidebar

Related Questions

Is there a logical way to strip out function names and their arguments using
I am trying to use logical operators in the following lambda expression int count
Sorry if this is a Logical Operators 101 kind of question. I've been staring
I was wondering if there is easy solution to this or I'm stuck with
I was solving last years GATE question paper where i am stuck with this
I am trying to make a simple command line client for accessing shares via
I always get stuck at some logic questions when it comes to programming. This
I just modified my C++/CLI project to change the way it was parsing its
I have been trying to find an answer to this question for months, but
I love programming languages and trying to think of logical solutions to problems. A

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.