Skip to content

Commit

Permalink
Fixed issue #7225: Data entry screen without the privilege of reading…
Browse files Browse the repository at this point in the history
… responses.
  • Loading branch information
c-schmitz committed Jan 29, 2013
1 parent dcf048f commit 33776e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/dataentry.php
Expand Up @@ -1527,7 +1527,7 @@ public function insert()
'clang' => $clang
);

if (hasSurveyPermission($surveyid, 'responses','read'))
if (hasSurveyPermission($surveyid, 'responses','create'))
{
if ($subaction == "insert" && hasSurveyPermission($surveyid,'responses','create'))
{
Expand Down Expand Up @@ -1906,7 +1906,7 @@ public function view($surveyid, $lang=NULL)
if(isset($lang)) $lang=sanitize_languagecode($lang);
$aViewUrls = array();

if (hasSurveyPermission($surveyid, 'responses', 'read'))
if (hasSurveyPermission($surveyid, 'responses', 'create'))
{
$clang = Yii::app()->lang;

Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/dataentry/insert.php
Expand Up @@ -81,7 +81,7 @@
<input type='submit' value='<?php $clang->eT("Return to survey administration"); ?>' onclick="window.open('<?php echo $this->createUrl('admin/survey/sa/view/surveyid/'.$surveyid); ?>', '_top')" />
<br /><br />

<?php if(isset($thisid)): ?>
<?php if(isset($thisid) && hasSurveyPermission($surveyid, 'responses','read')): ?>
<input type='submit' value='<?php $clang->eT("View this record"); ?>' onclick="window.open('<?php echo $this->createUrl('/admin/responses/sa/action/surveyid/'.$surveyid.'/id/'.$thisid); ?>', '_top')" />
<br /><br />
<?php endif; ?>
Expand Down

0 comments on commit 33776e5

Please sign in to comment.