Emile,
Well this change to the admin site will be sufficient for now. It will
prevent the users of the individual sitegroups from viewing the records of
the admin site. All other records (content, group and style) belonging to
the admin are moved to a sitegroup that I administer (sitegroup=1) and are
therefor not shown anyway.
I can work with this situation.
Thanks for the support,
Dick
I include the patch for those interested. This is how the last lines (164
and up) of the content belonging the host page in the admin site look:
<? } else {
$hh = mgd_get_host($h->id);
$sg = $hh->get_sitegroup();
if (($midgard->sitegroup == 0) || ($sg)) { ?>
<p><a href="&(mgdroot);/host/?open=&(h.root);#&(h.id);"><? echo $mgdright;
?></a> [&(h.id);] <a name="&(h.id);"><a href="&(h.id);.html">&(h.name);<? if
($h->port) { ?>:&(h.port);<? } ?>&(h.prefix);</a></a> <?if(!$h->online)
echo "(offline)"; }?></p>
<? } } ?>
<? if ($midgard->admin) { ?>
<p align="left"><a href="&(mgdroot);/host/?action=create" class="navi">New
host &(mgdnew:h);</a></p>
<? } ?>
<br clear="all">
<? } ?>
-----Original Message-----
From: Emiliano [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 19, 2000 11:32 PM
To: [EMAIL PROTECTED]
Subject: RE: [midgard] admin site sitegroup and user sitegroup
> I went ahead and changed the admin site. I wanted to manually filter the
> hosts records that are not in same sitegroup as the logged on user from
> being displayed. The problem now is that mgd_list_hosts does not include
the
> sitegroup field. Is this by design?
Not by design, no, but it is by implementation. To get the sitegroup
information you will have to refetch the individual host records, like
$hosts = mgd_list_hosts();
while ($hosts && $hosts->fetch()) {
$host = mgd_get_host($hosts->id);
if ($host->getsitegroup() == $midgard->sitegroup) {
...
}
}
Is the root/admin/user situation resolved?
Emile
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]