| View previous topic :: View next topic |
| Author |
Message |
Michael Houlahan Guest
|
Posted: Tue Jul 13, 1999 10:24 am Post subject: Checking One's Own Privileges with MySQL |
|
|
Is there a simple way to check one's own access privileges for a table.
I've got an app (accessed via the web with PHP and ODBC via MSAccess) and
want to display different fields on output screens depending on whether the
current user has update or read-only access. I can think of all sorts of
(scary) techniques for doing this - like attempting a dummy update at the
start of the form load (pretty inefficient) or giving "update" users access
to the mysql DB so they can check security directly via the User table
(dangerous).
There's gotta be a simpler way:-))
Mick
|
|
| Back to top |
|
 |
Paul DuBois Guest
|
Posted: Thu Jul 15, 1999 3:05 pm Post subject: Re: Checking One's Own Privileges with MySQL |
|
|
At 8:24 PM +1000 7/13/99, Michael Houlahan wrote:
| Quote: | Is there a simple way to check one's own access privileges for a table.
I've got an app (accessed via the web with PHP and ODBC via MSAccess) and
want to display different fields on output screens depending on whether the
current user has update or read-only access. I can think of all sorts of
(scary) techniques for doing this - like attempting a dummy update at the
start of the form load (pretty inefficient) or giving "update" users access
to the mysql DB so they can check security directly via the User table
(dangerous).
There's gotta be a simpler way:-))
|
In MySQL 3.23, DESCRIBE tbl_name (or SHOW COLUMNS FROM tbl_name)
display a "Privileges" column showing what your privileges are.
--
Paul DuBois, [email]paul (AT) snake (DOT) net[/email]
|
|
| Back to top |
|
 |
|