Page 1 of 1

Is there any way to check if the user connected to MySQL has update access to a specific table field?

Posted: Tue 24 Apr 2007 10:30
by gandalf1024
Hi,

I have some users that don't want them to be able to update specific fields in a table. I have given MySQL restrictions on certain table fields for these users, so that my application raises an exception whenever a user tries to change these protected fields.
Is there however, any way that MyDAC will check for update access on these fields and react accordingly, not letting the user change the field - before sending the update query to the database?
Or, can I check programmatically for the access restrictions for the current user and be able to mark the field readonly at runtime so that the user is not able to change the - for example - checkbox?

Thanx in advance,
Kostas

Posted: Wed 25 Apr 2007 10:16
by Antaeus
MyDAC does not support such fuctionality. Try to implement it using MySQL server facility.

Posted: Wed 25 Apr 2007 13:43
by EdderU2RSE
I think you must create user with differents actions:
Read, Write, Read-Write, Exe
RWX

Posted: Thu 26 Apr 2007 14:52
by gandalf1024
Ok, I found that I can easily search the information_schema DB for the info that is needed to implement read-only fields inside the application.

Thanx anyway :)