Hide phpmyadmin edit, copy and insert options

2019-08-02 21:36发布

问题:

I recently installed PHPMyAdmin 4.0.10 on a Linux server. I am using php 5.3 and am connecting to a MySQL 5.0 server. I created a limited MySQL user with only select and delete privileges. However, when I log into PHPMyAdmin with this limited user, I noticed that there are still buttons all over the interface for "edit", "copy", "insert", etc. Clicking on these buttons results in an error (obviously, since the user doesn't actually have permission to perform the actions).

My question is: "Is there a way to hide these buttons from view?". I was under the impression that PHPMyAdmin would intelligently hide operations that the current user did not have permission to use. Was I mistaken?

回答1:

I think the best solution for you right now is the new feature of user groups. Using a usergroup will allow you to hide the tabs across the top. Unfortunately, in some display views you'll still see these links, for instance when displaying a table's structure, you'll still see "Insert" displayed. This is unfortunate, and currently the expected behavior; fixing it probably should be a feature request.

So in short, no, at the moment there's no way to hide every link as you described. In many cases you're right, the proper buttons are hidden, but in this case I doubt anyone expected a user to be able to delete but not insert data, so this has probably never been tested before.



标签: phpmyadmin