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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:11:46+00:00 2026-05-20T18:11:46+00:00

We have a web application where we need to create functionality to manage users,

  • 0

We have a web application where we need to create functionality to manage users, roles , modules and their permissions.

Below is the design we have created. can anyone Let me know if it is proper way of implementing such functionality?

User table will have two columns as follows

1) Id
2) Name

Role table will have Role Id and role name.

A user can have multiple roles hence, we will have a user role reference table which will have user id and role id.

Role can be Admin, User, Moderator etc.

There can be lots of modules like Country , States, Orders, Divisions etc.

Each role will have access to certain modules like Admin will have access to all modules.

User will have access to few modules like Order only and so on.

So for this we have a separate static Modules table which will have module id and name.

We will have another Role Module reference table which will hold the information of which role have access to which modules.

Again, each user will have some roles and thus will have access to certain modules.

Now access to this modules is also based on permissions.

Like User will have only read permissions on States and Country i.e. he can only view the details.

Admin will have write permissions on states and country so that he can add, edit and delete them.

So, how do i go about implementing/designing this whole functionality in java?

  • 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-20T18:11:46+00:00Added an answer on May 20, 2026 at 6:11 pm

    Tables:

    • User (userID PK, name, etc…)
    • Role (roleID PK, name UQ, etc…)
    • UserRole (userID, roleID, PK(userID, roleID) dategranted etc…)
    • Module (moduleID PK, name UQ, etc…)
    • RoleModuleAccess (roleID, moduleID, PK(roleID, moduleID), accessFlags)

    To find out the access a user @userID has in a module @moduleID:

    select accessFlags
    from RoleModuleAccess rma 
        inner join UserRole ur on ur.roleID = rma.roleID
    where rma.moduleID = @moduleID and ur.userID = @userID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a web-controlled application (that lives in the browser ) that
I am writing an EF4 datalayer for an MVC 2 web application and I
I'm investigating integrating a 3rd party web application with PeopleSoft via web services. I'm
We have two separate web applications for a site: One for the site itself,
This is going to sound like an odd request, but... I have a web
Scenario: I have been using Java SE for quite some time, working with threads
ASP.NET Membership is just great as there are a ton of functionality right there
I'm creating my first android app and I need to use a service. The
I've got an existing website (based on .net 1.1), that calls web-services (based on
Greetings, I could not provide all the details in the question, so here are

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.