user and roles

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pwatel
Posts: 39
Joined: Wed 11 Feb 2009 09:42

user and roles

Post by pwatel » Fri 13 Jan 2012 08:19

Hello
I have created a role granting right to a table
I have assigned to a user this role
however when I login using this user I have no right to look at the data

there is no role in the login form (which would defy the purpose)
What am i doing wrong ????
thanks
PW

AndreyZ

Post by AndreyZ » Fri 13 Jan 2012 10:46

Hello,

To solve the problem, you should set the TIBCConnection.Options.Role property to the role name that you granted to a user.

pwatel
Posts: 39
Joined: Wed 11 Feb 2009 09:42

Post by pwatel » Sat 14 Jan 2012 05:11

Thank you
But how do I know what role has what user???

that the whole idea of user security you define roles and assign user to them
so when a user logs in knowing its roles we know its privileges. no need to grant for each user just a few roles

Why does the default login form has no field for roles then ????

Thanks
PW

AndreyZ

Post by AndreyZ » Tue 17 Jan 2012 11:10

You can assign many roles to one user, therefore you should give each user the name of the role that must be used. For the time being our ConnectDialog doesn't have the functionality that allows using role names. To avoid this problem, you can write your own connection form. Please take a look at the example of such connection form in the IBDACDemo->ConnectDialog demo.

tsteinmaurer
Posts: 52
Joined: Thu 17 Dec 2009 08:25

Post by tsteinmaurer » Tue 17 Jan 2012 15:34

@PW: You can query the system tables to get a list of roles a particular user is a member of.

Post Reply