You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need a plugin that intercept all queries before being submited to database.
I need this feature:
If the query contains "DROP DATABASE" it should be rejected, presenting some error message, like "NOT ALLOWED" to the user.
The scenario is:
All users are "@localhost" and the only interface they have is adminer.
We have a "LAB" database where users can make experiments.
Users should be allowed to drop tables/views but they shouldn't be allowed to drop the database.
Unfortunately, MySQL doesn't have separate "drop" grants for tables and databases.
Once the user have "GRANT DROP" permission. They can drop the ENTIRE DATABASE. (what a shame mysql !!)
So, the solution is blocking all "DROP DATABASE" commands in adminer before the query is submited to the database.
Chatgpt gave this plugin, but I didn't understand some parts, and I won't put any plugin in production before I have sure It runs safely. I'd be very thankfull for any help
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I need a plugin that intercept all queries before being submited to database.
I need this feature:
If the query contains "DROP DATABASE" it should be rejected, presenting some error message, like "NOT ALLOWED" to the user.
The scenario is:
All users are "@localhost" and the only interface they have is adminer.
We have a "LAB" database where users can make experiments.
Users should be allowed to drop tables/views but they shouldn't be allowed to drop the database.
Unfortunately, MySQL doesn't have separate "drop" grants for tables and databases.
Once the user have "GRANT DROP" permission. They can drop the ENTIRE DATABASE. (what a shame mysql !!)
So, the solution is blocking all "DROP DATABASE" commands in adminer before the query is submited to the database.
Chatgpt gave this plugin, but I didn't understand some parts, and I won't put any plugin in production before I have sure It runs safely. I'd be very thankfull for any help
Beta Was this translation helpful? Give feedback.
All reactions