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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:11:41+00:00 2026-05-11T19:11:41+00:00

I have users for my application with access control list (these are both tables/schema/objects).

  • 0

I have users for my application with access control list (these are both tables/schema/objects). Currently these are read from the database, Boolean values are used to indicate what they can view/manipulate. However, anyone can still go to the database and change the data. Can someone offer some suggestion on what kind of things I can do? I hope I am clear we have users (uname + pass) and acl (empui_access, empdat_manipulate). Any kinda security solutions via code 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-11T19:11:42+00:00Added an answer on May 11, 2026 at 7:11 pm

    Something like

    table users
    username: string
    password_hash: hex
    acl: bit array
    

    username is the username, password_hash is the hash of the password, with a grain of salt. It’s wrong to store a plain password, but you already knew that, didn’t you?

    ACL is declared as a string but used as a bit array.
    Each bit represents a certain permission. 1 means the user has the permission, 0 means he doesn’t. To check for a certain bit’s value, you do a bit-wise AND on the acl. If the result is non-zero, access is granted. If the result is zero, access is denied.

    For example:

    // permission to read employee data
    public const long READ_EMPL_DATA = 0x01
    
    ...
    {
        User user = database.GetSomeUser();
        // test for READ_EMPL_DATA permission
        if (0 != (user.ACL & READ_EMPL_DATA)) {
            // access granted
        } else {
            // access denied
        }
        // give READ_EMPL_DATA permission
        if (0 != (user.ACL & READ_EMPL_DATA))
            user.ACL = user.ACL & READ_EMPL_DATA
    }
    

    To add group support, add a couple tables.

    table group
    groupname: string
    acl: bit array
    
    table user_group
    user_id: id
    group_id: id
    

    And in addition to testing for the user-level permission, test the groups to which the user belongs. Of course, you’ll write some helper functions, maybe a stored procedure.

    I hope this got you started. If not, I can give you a more descriptive example, or more actual code, or other help.

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

Sidebar

Ask A Question

Stats

  • Questions 121k
  • Answers 121k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A standalone executable cannot be directly integrated into a website.… May 12, 2026 at 12:30 am
  • Editorial Team
    Editorial Team added an answer After much exploration, this behavior turned out to be due… May 12, 2026 at 12:30 am
  • Editorial Team
    Editorial Team added an answer There are two ways that files get loaded in Rails:… May 12, 2026 at 12:30 am

Related Questions

I have created an MS Access 2003 application, set up as a split front-end/back-end
So I'm wiring up my first MasterPage, and everything is working great except for
My company is building an ASP.NET HR application and we have decided to create
I have a scenario where users of my ASP.NET web application submit testimonials consisting

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.