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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:56:24+00:00 2026-06-06T16:56:24+00:00

I’m still working in my ACL project, and I’d like some ideas for the

  • 0

I’m still working in my ACL project, and I’d like some ideas for the following problem:

I’m using MySQL to store my users, roles and permissions. At first, I created a field “parent_id” in my TABLE Roles, and I was trying to manage the permissions of each user through this. It was kind of working, till I realised that if I add a new role, it was really complicated to manage the hierarchy and control who has access to which resource. I did some searches and I realise it’s really complicated to use a relational database to work with hierarchy, so I gave up using hierarchy.

I’d like your help to find the best solution to manage the creation of users:
I have 4 different users: SuperAdmin, CustomerAdmin, Technician, client.
When I’m in the page to create new users, I don’t want to let a technician creates a new user of the type CustomerAdmin, or SuperAdmin, for example.

I thought in letting only the SuperAdmin create a new user, but one of my constraints is that I must let a CustomerAdmin create users too, also a technician.

Trying to be more didactic, the SuperAdmin can be me. The customer admin is my client and he has an enterprise. In his enterprise, he can create 2 types of users: technicians and clients.

This is just an example, but if I want to create a new kind of role giving him new permissions, I must find a way to deny him the permission to create a more powerful user than him.

I’m not sure if I was objective in my question, but anyone who can talk about this with me will be welcome.

  • 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-06-06T16:56:26+00:00Added an answer on June 6, 2026 at 4:56 pm

    You already have your roles but each role needs to have rights to perform actions. This is almost certainly overkill but it should be highly flexible.

     | Role Table                           | 
     | Role ID | Role Name   | Access Level |
     ----------------------------------------
     |       1 | SuperAdmin  |           10 |
     |       2 | ClientAdmin |           20 |
     |       3 | Technician  |           40 |
     |       4 | Client      |           80 |
    
     | Action Table            |
     | Action ID | Action Name |
     ---------------------------
     |         1 | Create User |
     |         2 | Delete User |
     Etc.
    
     | Rights Table                   |
     | Right ID | Role ID | Action ID |
     ----------------------------------
     |        1 |       1 |         1 |
     |        2 |       1 |         2 |
     |        3 |       2 |         1 |
     |        4 |       2 |         2 |
     Etc.
    
     | Parameter Table                                         |
     | Param ID | Right ID | Parameter Name  | Parameter Value |
     -----------------------------------------------------------
     |        1 |        1 | Max User Access |              10 |
     |        2 |        2 | Max User Access |              10 |
     |        3 |        3 | Max User Access |              20 |
     |        4 |        4 | Max User Access |              20 |
     Etc.
    

    The Rights table shows that both SuperAdmin and ClientAdmin can create and delete users. The Parameter table restricts ClientAdmin to creating users with a maximum access level of 20 (1 being the highest). You can match this access level back to a role to offer a list of roles for the new user where Role.Access_Level >= Max User Access.

    Actions can use more than one parameter set according to right but I couldn’t think of anything other than Max User Access.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I've tracked down a weird MySQL problem to the two different ways I was
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am reading a book about Javascript and jQuery and using one of the

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.