[dokuwiki] Re: [PATCH] MySQL canDo() patch

Matthias Grimm wrote:
I don't think there is any reason for modifyUser to be connected to delGroup.

It wouldn't if there was no reason for it. See above.
I checked your code and it seems its an implementation specific issue, tied into your error handling and as such that decision shouldn't impact on the auth interface.
I'd reckon MySQL backend is being to stringent in refusing canDo(modifyUser) if leaveGroup & joinGroup aren't supported. If some parts of a user profile can be modified, the backend should return true and determine which parts of the modifyUser request to apply and which to reject.

It's the other way round. If modifyUser() is supported you also have support for leaveGroup() and joinGroup(). By the way these two functions are completely obsolete because the modifyUser() functions is able to handle group changes already and the Group functions are never used. So I vote for removing these two functions from the interface.

So we get:      modifyUserProfile()     NEW
                leaveGroup()            REMOVE
                joinGroup()             REMOVE

Adding modifyUserProfile does make sense. Removing the other two from the basic auth interface doesn't - though you can choose to not support them in the mysql class.

modifyUser would then becomes an internal combination of one or more of
- modifyUserProfile
- leaveGroup
- joinGroup

I guess I didn't anticipate that database based auth systems wouldn't modify a user by calling leaveGroup and joinGroup rather than internalising that functionality.

At present there is no group manager, but for a wiki attached to an external authorisation system. User management is unimportant - its handled elsewhere. Group management becomes important. Assigning users to dokuwiki groups is the only control the administrator would have over who accesses certain pages/functions, especially where wiki groups need to be maintained independently from groups in the auth system or when the auth system does not support groups.

Cheers,

Chris

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: