-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

- --On 21.05.2002 21:27:12 +1200 martin langhoff wrote:

> Teh inability to overload mgd functions or objects dynamically from
> PHP creates some very interesting situations.
> 
> To be able to delete an object (an article, in my case) you have to
> get rid of any properties. Otherwise, the deletion will just fail.
> Fair enough, midgard is keeping the database consistent.
> 
> So what will the cautious programmer do? Dete all properties related
> to that object. I assume the same applies to attachments.
> 
> However, sometimes deleting the article will fail. Most likely cause:
> the user did not have enough privileges.
> 
> So,
> 
>   - does $obj->parameter() observe the same rules as
> mgd_delete_article()? (hint: the documentation doesn't say a thing
> about it!)

Fact is, that the parameter function does not have to do any
consistency checking upon delete, because no other entity can be used
on parameters, so there are no dependencies. Also parameters inherit
access permissions from the parent object.


>   - should I need to evaluate if a mgd call is going to fail (because
> maybe I am storing my " parameters"  in my own separate RDBMS), what
> should I do?
>
> Where am I? I am deleting the properties before the delete call --
> doing it in the reverse order will fail every time -- , and will soon
> start testing whether its checking for ownership/privileges/yadda. If
> it doesn't, I'll roll up my sleeves and get something going.

What you can do before deletion is testing whether the user in question
is in the group required to delete something. If yes, commence, if no,
abort the whole thing before you come to it.

The problem is, that the whole permission system of Midgard is rather
simple. So changing anything there will require a lot of thought before
we do anything, especially because this is something we shuld keep for
the next major version upgrade of Midgard.

I'd suggest that you write a small specification of what you need and
then post it here on midgard-user to discuss it. Only then I can give
you a more elaborte answer on what should be easy, and what not.


Live long and prosper!
Torben Nehmer

- --
Torben Nehmer, Munich, Germany
http://www.nathan-syntronics.de, mailto:[EMAIL PROTECTED]
PGP Public Key ID on wwwkeys.(de.)pgp.net: 0x7E9DE456
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE86hYKJPh4Kn6d5FYRArpkAKDcg+zCTUTwse5+XfZ5lCMTtFaYrgCeOOkL
Pa/OWHowrihJMbG/X6v3tC8=
=TBRQ
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to