Skip to content

Commit

Permalink
required read permission to cash registry to be able view receipt list
Browse files Browse the repository at this point in the history
  • Loading branch information
chilek committed May 2, 2012
1 parent bf33245 commit 5a8c491
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ version ? (????-??-??):
- new simple plugin which allows to use one-time sms passwords [chilan]
- payments: support %type placeholder which gets its value from tarifftypes config section [chilan]
- queues to whom we don't have access privileges, are not shown at all [chilan]
- required read permission to cash registry to be able view receipt list [chilan]

version 1.11.13 Dira (2011-04-07)

Expand Down
5 changes: 2 additions & 3 deletions modules/receiptlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,8 @@ function GetReceiptList($registry, $order='', $search=NULL, $cat=NULL, $from=0,
$SESSION->redirect('?m=cashreglist');
}

if(! $DB->GetOne('SELECT rights FROM cashrights WHERE userid=? AND regid=?', array($AUTH->id, $regid)) )
{
$SMARTY->display('noaccess.html');
if (!$DB->GetOne('SELECT rights FROM cashrights WHERE userid = ? AND regid = ? AND rights & 1 = 1', array($AUTH->id, $regid))) {
$SMARTY->display('noaccess.html');
$SESSION->close();
die;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/cashreginfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <H1>{$layout.pagetitle}</H1>
<INPUT type="hidden" name="registry[usernames][{$right.id}]" value="{$right.name}">
</TD>
<TD width="1%" align="center">
{if $right.rights > 0}<IMG src="img/pass.gif" alt="">{/if}
{if ($right.rights & 1) == 1}<IMG src="img/pass.gif" alt="">{/if}
</TD>
<TD width="1%" align="center">
{if ($right.rights & 2)==2}<IMG src="img/pass.gif" alt="">{/if}
Expand Down

0 comments on commit 5a8c491

Please sign in to comment.