473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

which solution u advising me to use for login system

hi, i don't know if there is a design pattern for this, but this is the case:
my java application to manage players, coaches, teams and matches.

only one administrator is allowed to add, change of delete players, teams ..
and only users with high permission are allowed to add matches or delete them from the database.

i was thinking about this solution:

add a new table to my DB: tblusers
user_id, user, password, privilege level

Expand|Select|Wrap|Line Numbers
  1. if (user.getPrivilegeLevel == x){
  2.   // delete, insert, .. 
  3. }
but this is a lot of work, to add this control to all classes alle methodes in dataacces layer and business layer, don't u think that?

thx & kr
e
May 27 '09 #1
2 1240
dmjpro
2,476 2GB
Well...You can have three tables.
users{
user_id (primary_key),
password,
user_details ... addresses/contact info ....etc
};

programs{
program_id (primary_key),
program_details ..if any
};

and

user_accesses{
program_id (foreign key -> program_id of programs)
user_id (foreign key -> user_id of users),
acess_details ... insert(Y/N),update(Y/N)...etc
};.

First and last tables are obvious.
But the middle one ... which program? ;)
Basically it refers to your pages to be used by the users.
So by using joining these three tables you can get all the privileges of an user for a particular page/program.
May 27 '09 #2
i'm gonne think about that solution
thank u
May 27 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: XP | last post by:
I am having problems with the blow page. I have a login page where I enter the userid and password. This then connects to this page. If I enter the userid and password correctly, it prints...
0
by: Ravindra | last post by:
Well I installed the framework provided by microsoft , the problem is I am able to activate the smart tag in the doc file but when I Click on the Show Detils option in the information bridge the...
2
by: tarunbajaj | last post by:
Hello Readers, I am working on a web application.It has two Projects A & B under a Solution, for each Region, using the site. The Code base for both the Projects is same. There is a login page in...
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
12
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I...
1
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
2
by: Sasquatch | last post by:
I'm still having trouble creating a simple login page using the asp:login control. I followed some instructions in a WROX book, "Beginning ASP.NET 2.0," and the instructions are very straight...
0
by: muder | last post by:
I have a standard Login ASP.NET 2.0 control on a login Page, a LoginName and LoginStatus controls on the member's page. once the user login successfully I am redirecting the user to Member.aspx...
0
by: sandari | last post by:
The following code (web.config in Visual Studio 2005) is supposed to redirect a user to the appropriate Form depending on their role. However, regardless of the user's role, the only page...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.