cosmocode / virtualgroup

Create virtual user groups in DokuWiki
http://www.dokuwiki.org/plugin:virtualgroup
GNU General Public License v2.0
10 stars 5 forks source link

Doesn't work where Wiki just uses "$auth->getUserData(...)" #8

Open einhirn opened 12 years ago

einhirn commented 12 years ago

Hello, I just found out that this plugin doesn't work well with email subscriptions. Subscription processing switches to the subscribed user via $auth->getUserData before doing an auth_quickaclcheck for the ID in question. Since this plugin doesn't hook $auth's methods but rewrites $USERINFO later on, users that only have access via virtualgroup won't ever get an email notifier.

It should probably be possible to create kind of a "passthrough" auth class that just queries the original ones (of course rewriting the list of groups returned) and put that into "$auth". That way, in my opinion, it should be possible to intercept calls to $auth->getUserData.

If there is a way to hook $auth even before the user is first authenticated and the session is built, we could even do without rewriting the group array later on.

bye Christian

einhirn commented 8 years ago

Probably will try to rewrite this plugin to be an auth plugin which in turn calls another auth plugin, so it can modify group membership properly. Come time, come code.