Get user roles
-
- Posts: 5
- Joined: Tue 22 Jan 2019 06:29
Get user roles
How can I get the user's roles? I need to adjust the Select statements, as well as visibility properties for Vcl Form components for MariaDB depending on the users roles. MariaDB does not allow Select * when not all columns have select privileges. Or is there another way this is usually handled?
Re: Get user roles
You can find the necessary information on getting get user roles by the link https://dev.mysql.com/doc/refman/8.0/en ... rants.html
-
- Posts: 5
- Joined: Tue 22 Jan 2019 06:29
Re: Get user roles
Sorry, question was not clear enough. Yes I can use the Show Grants statement, but what I am looking for is a way to do this in Delphi code. Something like if User.HasRole('Financial') then change select statement and set visibility for controls based on return value
Re: Get user roles
MyDAC components don't have those properties. You may try implementing the required functionality yourself, for example, by sending requests to MySQL server and handling the response.