Subject: CAcert Code Development list.
List archive
- From: Wytze van der Raay <wytze AT cacert.org>
- To: Michael Tänzer <michael.taenzer AT cacert.org>
- Cc: "critical-admin AT cacert.org" <critical-admin AT cacert.org>, cacert-devel AT lists.cacert.org, Ulrich Schröter CAcert <ulrich AT cacert.org>, Dirk Astrath <dirk.astrath AT cacert.org>, Marcus Mängel <inopiae AT cacert.org>, Benedikt Heintel <benedikt AT cacert.org>
- Subject: Re: Patch request: Bug #981
- Date: Fri, 10 Aug 2012 13:16:46 +0200
- Organization: CAcert
Hi Michael,
Op 9-8-2012 18:44, Michael Tänzer schreef:
> We have a fix for https://bugs.cacert.org/view.php?id=981
> "New layout of view for Organisation Administraors in account/id35"
>
> The fix was reviewed by Dirk Astrath (dastrath) and me (NEOatNHNG) and
> tested by Marcus Mängel (Uli60) and Benedikt Heintel (Benedikt).
>
> Diff is attached. Please also run the locale makefile so that our
> translators see the new strings (if present) on
> https://translations.cacert.org and new translations get imported into
> the system.
>
> Changed files:
> includes/account.php
> includes/account_stuff.php
> pages/account/35.php
The fix has been installed on the production server on August 10, 2012.
See also the attached log message. Also, the translation server upload
and downloads have been performed as requested.
Regards,
-- wytze
--- Begin Message ---Fix for https://bugs.cacert.org/view.php?id=981
- From: Wytze van der Raay <wytze AT cacert.org>
- To: cacert-systemlog AT lists.cacert.org
- Subject: Fwd: [cvs.cacert.org checkin notification]
- Date: Fri, 10 Aug 2012 13:14:05 +0200
- Organization: CAcert
New layout of view for Organisation Administrators in account/id35
In conjunction with the attached CVS changes a new tarball has been
made available incorporating all updates. The new tarball is available
through http://www.cacert.org/src-lic.php
-- end
--- Begin Message ---
- From: "root" <root AT cvs.cacert.org>
- To: critical-admin AT cacert.org
- Subject: cvs.cacert.org checkin notification
- Date: Fri, 10 Aug 2012 13:06:21 +0200 (CEST)
uid=0(root) gid=0(root) groups=0(root)
account.php 1.157 1.158 account_stuff.php 1.58 1.59
Fri Aug 10 13:06:21 CEST 2012
Update of /var/lib/cvs/cacert/includes
In directory hlin:/home/cacert/www/includes
Modified Files:
account.php account_stuff.php
Log Message:
Fix for https://bugs.cacert.org/view.php?id=981
New layout of view for Organisation Administrators in account/id35
===================================================================
RCS file: /var/lib/cvs/cacert/includes/account_stuff.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- account_stuff.php 2011/11/25 11:28:18 1.58
+++ account_stuff.php 2012/08/10 11:06:20 1.59
@@ -209,7 +209,7 @@
<ul class="menu" id="serverorg"><li><a
href="account.php?id=20"><?=_("New")?></a></li><li><a
href="account.php?id=22"><?=_("View")?></a></li></ul>
</div>
<? } ?>
-<? if(mysql_num_rows(mysql_query("select * from `org` where
`memid`='".intval($_SESSION['profile']['id'])."' and `masteracc`='1'")) > 0
|| $_SESSION['profile']['orgadmin'] == 1) { ?>
+<? if(mysql_num_rows(mysql_query("select * from `org` where
`memid`='".intval($_SESSION['profile']['id'])."'")) > 0 ||
$_SESSION['profile']['orgadmin'] == 1) { ?>
<div class="relatedLinks">
<h3 class="pointer" onclick="explode('orgadmin')">+ <?=_("Org
Admin")?></h3>
<ul class="menu" id="orgadmin"><? if($_SESSION['profile']['orgadmin']
== 1) { ?><li><a href="account.php?id=24"><?=_("New
Organisation")?></a></li><li><a href="account.php?id=25"><?=_("View
Organisations")?></a></li><? } ?><li><a
href="account.php?id=35"><?=_("View")?></a></li></ul>
===================================================================
RCS file: /var/lib/cvs/cacert/includes/account.php,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- account.php 2012/07/25 15:16:41 1.157
+++ account.php 2012/08/10 11:06:19 1.158
@@ -2246,8 +2246,7 @@
$orgid = 0;
}
- if($id == 32 || $oldid == 32 || $id == 33 || $oldid == 33 || $id ==
34 || $oldid == 34 ||
- $id == 35 || $oldid == 35)
+ if($id == 32 || $oldid == 32 || $id == 33 || $oldid == 33 || $id ==
34 || $oldid == 34)
{
$query = "select * from `org` where
`memid`='".intval($_SESSION['profile']['id'])."' and `masteracc`='1'";
$_macc = mysql_num_rows(mysql_query($query));
@@ -2260,6 +2259,19 @@
}
}
+ if($id == 35 || $oldid == 35)
+ {
+ $query = "select 1 from `org` where
`memid`='".intval($_SESSION['profile']['id'])."'";
+ $is_orguser = mysql_num_rows(mysql_query($query));
+ if($_SESSION['profile']['orgadmin'] != 1 && $is_orguser <= 0)
+ {
+ showheader(_("My CAcert.org Account!"));
+ echo _("You don't have access to this area.");
+ showfooter();
+ exit;
+ }
+ }
+
if($id == 33 && $_SESSION['profile']['orgadmin'] != 1)
{
$orgid = intval($_SESSION['_config']['orgid']);
--- End Message ------ Begin Message ---
- From: "root" <root AT cvs.cacert.org>
- To: critical-admin AT cacert.org
- Subject: cvs.cacert.org checkin notification
- Date: Fri, 10 Aug 2012 13:06:30 +0200 (CEST)
uid=0(root) gid=0(root) groups=0(root)
35.php 1.5 1.6
Fri Aug 10 13:06:30 CEST 2012
Update of /var/lib/cvs/cacert/pages/account
In directory hlin:/home/cacert/www/pages/account
Modified Files:
35.php
Log Message:
Fix for https://bugs.cacert.org/view.php?id=981
New layout of view for Organisation Administrators in account/id35
===================================================================
RCS file: /var/lib/cvs/cacert/pages/account/35.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- 35.php 2008/09/03 18:36:16 1.5
+++ 35.php 2012/08/10 11:06:29 1.6
@@ -15,44 +15,89 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/ ?>
+
<table align="center" valign="middle" border="0" cellspacing="0"
cellpadding="0" class="wrapper" width="400">
- <tr>
- <td colspan="3" class="title"><?=_("Organisations")?></td>
- </tr>
- <tr>
- <td class="DataTD">#</td>
- <td class="DataTD"><?=_("Organisation")?></td>
- <td class="DataTD"><?=_("Admins")?></td>
- </tr>
-<?
- $query = "select * from `orginfo`,`org` where
`orginfo`.`id`=`org`.`orgid` and
`org`.`memid`='".intval($_SESSION['profile']['id'])."'";
- $res = mysql_query($query);
- while($row = mysql_fetch_assoc($res))
- {
- //number of admins for the org
- $r2 = mysql_query("select * from `org` where
`orgid`='".intval($row['id'])."'");
- $admincount = mysql_num_rows($r2);
- // number of domains for the org
- $r2 = mysql_query("select * from `orgdomains` where
`orgid`='".intval($row['id'])."'");
- $domcount = mysql_num_rows($r2);
-?>
- <tr>
- <td class="DataTD"><?=intval($row['id'])?></td>
- <td class="DataTD"><?=($row['O'])?>, <?=($row['ST'])?>
<?=sanitizeHTML($row['C'])?></td>
- <td class="DataTD"><a
href="account.php?id=32&orgid=<?=$row['id']?>"><?=_("Admins")?>
(<?=$admincount?>)</a></td>
- </tr>
<?
- // display the domains of each organisation
- $query3 = "select * from `orgdomains` where
`orgid`='".intval($row['id'])."'";
- $res3 = mysql_query($query3);
- while($detailorg = mysql_fetch_assoc($res3))
+$query = "select *
+ from `orginfo`,`org`
+ where `orginfo`.`id`=`org`.`orgid`
+ and
`org`.`memid`='".intval($_SESSION['profile']['id'])."'";
+
+$res = mysql_query($query);
+while($row = mysql_fetch_assoc($res))
+{
+ ?>
+ <tr>
+ <td colspan="3" class="title"><?=_("Organisation")?></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("Organisation Name")?>:</td>
+ <td colspan="2" class="DataTD" ><b><?=$row['O']?></b></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("Contact Email")?>:</td>
+ <td colspan="2" class="DataTD"><?=($row['contact'])?></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("Town/Suburb")?>:</td>
+ <td colspan="2" class="DataTD"><?=($row['L'])?></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("State/Province")?>:</td>
+ <td colspan="2" class="DataTD"><?=($row['ST'])?></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("Country")?>:</td>
+ <td colspan="2" class="DataTD"><?=($row['C'])?></td>
+ </tr>
+ <?
+
+ //domain info
+ $query = "select `domain` from `orgdomains` where
`orgid`='".intval($row['id'])."'";
+ $res1 = mysql_query($query);
+ while($domain = mysql_fetch_assoc($res1))
+ {
+ ?>
+ <tr>
+ <td class="DataTD"><?=_("Domain")?></td>
+ <td colspan="2"
class="DataTD"><?=sanitizeHTML($domain['domain'])?></td>
+ </tr>
+ <?
+ }
+
+ ?>
+ <tr>
+ <td class="DataTD"><?=_("Administrator")?></td>
+ <td class="DataTD"><?=_("Master Account")?></td>
+ <td class="DataTD"><?=_("Department")?></td>
+ </tr>
+ <?
+
+ //org admins
+ $query = "select * from `org` where `orgid`='".intval($row['id'])."'";
+ $res2 = mysql_query($query);
+ while($org = mysql_fetch_assoc($res2))
{
-?>
- <tr>
- <td class="DataTD"><?=intval($detailorg['id'])?></td>
- <td class="DataTD"><?=_("Domain available")?></td>
- <td class="DataTD"><?=sanitizeHTML($detailorg['domain'])?></td>
- </tr>
-<? } } ?>
+ $user = mysql_fetch_assoc(mysql_query("select * from `users`
where `id`='".intval($org['memid'])."'"));
+ ?>
+ <tr>
+ <td class="DataTD"><a
href='mailto:<?=$user['email']?>'><?=($user['fname'])?>
<?=($user['lname'])?></a></td>
+ <td class="DataTD"><?=($org['masteracc'])?></td>
+ <td class="DataTD"><?=($org['OU'])?></td>
+ </tr>
+ <?
+
+ if(intval($org['masteracc']) === 1 &&
+ intval($org['memid']) ===
intval($_SESSION['profile']['id']))
+ {
+
$master="account.php?id=32&orgid=".intval($row['id']);
+ ?>
+ <tr>
+ <td colspan="3" class="DataTD"><a
href="<?=$master ?>"><?=_("Edit")?></a></td>
+ </tr>
+ <?
+ }
+ }
+} ?>
</table>
--- End Message ---Attachment: smime.p7s
Description: S/MIME-cryptografische ondertekening
--- End Message ---
Attachment:
smime.p7s
Description: S/MIME-cryptografische ondertekening
- Patch request: Bug #981, Michael Tänzer, 08/09/2012
- Re: Patch request: Bug #981, Wytze van der Raay, 08/10/2012
Archive powered by MHonArc 2.6.16.