views:

98

answers:

1

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

  • can READ all rows
  • cannot WRITE to rows with id < x, but can WRITE to row >= x
  • etc...

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.

+1  A: 

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 ;)

BlaM