If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Db2 grant permission for jsp page

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 7
Db2 grant permission for jsp page

Hello, I'm designing a jsp page for login where users will be taken from db2. I'll try to explain on an example; I need dynamic tables in my jsp which will automatically fill according to users roles. For example there will be an administrator who has all write/read permissions, Students will read their marks, etc.. and will write for changing their passwords. Teachers will see all the students and have write permissions on lesson...

Basically its like I explained on the above example. I need to use schemas I guess and groups for user roles, but how can I get this roles according to user (and their ID's; ex: where student_id = "...") in a jsp page and get the tables with read or/and write rights. Thanks in advance...
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 478
You may use app users and roles. This means that the usernames, privileges and roles are stored into DB and you will build your SQL based on this, while you will using a single user to connect to DB2.
__________________
Florin Aparaschivei
DB2 9.7 on Windows
Iasi, Romania
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 7
how about using sessions for the example that I want? Would it be easier to do it with sessions?
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 478
What do you mean by sessions?
On the other hand, take a look at DB2 LBAC.
__________________
Florin Aparaschivei
DB2 9.7 on Windows
Iasi, Romania
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 7
I want to make my program to be session based, I'm so confused about this permissions, sessions can be hold in jsp page but I saw sessions in db2 that I think it can be done, whatever
Reply With Quote
Reply

Tags
db2 10.1, grant privilege, jsp, roles

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On