Skip to content

Commit 1c6c9dc

Browse files
yllentrasher
authored andcommitted
fix rights in computer tabs - see #3218
1 parent 92f9835 commit 1c6c9dc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

inc/computerantivirus.class.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static function getSearchOptionsToAdd() {
188188
function showForm($ID, $options=array()) {
189189
global $CFG_GLPI;
190190

191-
if (!Session::haveRight("computer", UPDATE)) {
191+
if (!Session::haveRight("computer", READ)) {
192192
return false;
193193
}
194194

@@ -262,6 +262,7 @@ function showForm($ID, $options=array()) {
262262
echo "<td colspan='2'></td>";
263263
echo "</tr>";
264264

265+
$options['canedit'] = Session::haveRight("computer", UPDATE);
265266
$this->showFormButtons($options);
266267

267268
return true;

inc/computerdisk.class.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function defineTabs($options=array()) {
102102
$ong = array();
103103
$this->addDefaultFormTab($ong);
104104
$this->addStandardTab('Log', $ong, $options);
105-
105+
106106
return $ong;
107107
}
108108

@@ -144,7 +144,7 @@ static function cloneComputer ($oldid, $newid) {
144144
function showForm($ID, $options=array()) {
145145
global $CFG_GLPI;
146146

147-
if (!Session::haveRight("computer", UPDATE)) {
147+
if (!Session::haveRight("computer", READ)) {
148148
return false;
149149
}
150150

@@ -209,6 +209,7 @@ function showForm($ID, $options=array()) {
209209
Html::autocompletionTextField($this, "freesize");
210210
echo "&nbsp;".__('Mio')."</td></tr>";
211211

212+
$options['canedit'] = Session::haveRight("computer", UPDATE);
212213
$this->showFormButtons($options);
213214

214215
return true;

0 commit comments

Comments
 (0)