Rui Vieira
Rui Vieira

Reputation: 5338

In MySQL 5.x, is it possible to give permissions based on conditions (not using views)?

In a project I'm starting I would like to give privileges to users based on certain conditions, eg (in a certain table):

I would like to avoid views as these conditions might change for each user (I understand I would have to create a view for each case) I would also like to avoid enforcing this on the client side, as it could easily be bypassed.

If this is not possible, what work around would you suggest?

Many thanks in advance.

Upvotes: 0

Views: 167

Answers (1)

BlaM
BlaM

Reputation: 28888

I don't think it's possible with raw MySQL privilege system.

As long as you don't want to implement it on the client side, modifying MySQL code yourself might be your only option. After all it's open source ;)

Upvotes: 1

Related Questions