Let me get this straight.
You want htaccess to find out which "user group" a user belongs to and based on that, grant or deny accesss to certain directories?
If so, I don't think htaccess can do that. (I'm not 100% sure, but I really don't think it can). Your best bet for something like this is writing a pretty darn compicated PHP script.
Somebody, correct if I'm wrong.