[dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Matthias Grimm <matthiasgrimm@xxxxxxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 31 Jan 2006 19:36:44 +0100
On Mon, 30 Jan 2006 23:09:17 +0000
Chris Smith <chris@xxxxxxxxxxxxx> wrote:
Hi,
I'm sorry that the MySQL backend can't read your mind. ;-)
To make one fact clear as ice: The canDo() function of the
mysql backend does excatly what it should do. It tests the
capability of the current environment to do certain tasks
and reject the request if a preconditon is not set.
Therefore it is completely useless to discuss if modifyUser
should rely on delGroup or delUserGroup. It does and if you
didn't set the SQL statements appropriately, dokuwiki would
end up in a mysql error message.
What we can do to disentangle the functions is to define a new
interface function 'modifyUserProfile()' that only changes the
user dataset without group membership. This would be an easy
extension.
A word to the option 'TablesToLock'. People blamed me that the
mysql backend is not save because it doesn't use transactions.
They don't understand that the backend have to work with mysql
3.23 too and that transactions are first usable in mysql 4.0.
Therefore I do my best to protect database requests with table
locks. These locks are not perfect but give you the best chance
to keep you data intact and dokuwiki running.
You might be right that READ locks are not so important but they
are the one and only security feature that protects your database
inegrity and I would really ask you: Would you accept the risk of
dokuwiki program failures and data corruption for the short term
benefit of letting the 'TablesToLock' option undefined?
> 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'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
If you agree, I will prepare a patch for the mysql backend and for the
basic class on demand.
Best Regards
Matthias
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith
- [dokuwiki] TablesToLock option (was: [PATCH] MySQL canDo() patch)
- From: Andreas Gohr
- References:
- [dokuwiki] [PATCH] MySQL canDo() patch
- From: Matthias Grimm
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith
Other related posts:
- » [dokuwiki] [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- » [dokuwiki] Re: [PATCH] MySQL canDo() patch
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith
- [dokuwiki] TablesToLock option (was: [PATCH] MySQL canDo() patch)
- From: Andreas Gohr
- [dokuwiki] [PATCH] MySQL canDo() patch
- From: Matthias Grimm
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Andreas Gohr
- [dokuwiki] Re: [PATCH] MySQL canDo() patch
- From: Chris Smith