Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
4 posts • Page 1 of 1
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?
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
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