Re: object setsitegroup
Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Wed, 8 Mar 2006 13:18:04 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
Tarjei Huse <tarjei-y/[email protected]> wrote: > > I think that real use cases are: > > > > 1. Create new sitegroup with admin group and admin person. > > And this can be solved with ability to set sitegroup when create method is called. > Please add : > Also create host (as you have to be sg0 for that), pages and topics for > the sitegroup. This is generic create method. So you can do this ( as SG0 admin ): $sg = new midgard_sitegroup(); /* it doesn't exist yet , but may be replaced with legacy sg */ $sg->name = "sgname"; $sg->create(); $host = new midgard_host(); $host->name = "my name"; $host->sitegroup = $sg->id; $host->create(); $group = new midgard_group(); $group->name = "sgname administrators"; $group->sitegroup = $sg->id; $group->create(); etc etc > > To sum up , I would like to propose: > > > > 1. Sitegroup settable only when create method is called. > > 2. Sitegroup not settable when update is called even for SG0 admin. > > 3. setsitegroup method should be replaced with object's replication. > ?? Please explain that one. Jukka pointed to object's attachments and parameters ( and even links). And when I wrote about setting SG for different objects while being logged in SG0 admin I reminded myself that I couldn't edit some object's parameters later. Those were still in SG0. Briefly setsitegroup method should do *exactly* the same what is done during replication to keep db structure ( and application's one! ) logic. > > 5. Sitegroup delimeters should be dropped, or optionally supported. > Maybe only supported in basic auth? The point is that this one is the only one problem :) > Also, you should remember that this will brake all legacy admin interfaces. Yes, if we want to keep mgd_auth_midgard. But such feature should be a method of midgard_account class which should ( probably ) extend midgard_person ( if this one should be defined by schema ). So once we implement new auth mechanism we should be safe as legacy apps like spider or Aegir won't be supported after 1.8 and even won't be included in data package. Piotras