MDL-44140 badges: Prevent non-owners to change visibility of issued badges
Signed-off-by: Yuliya Bozhko <[email protected]>
This commit is contained in:
committed by
Damyon Wiese
parent
052b8c81c6
commit
100ec86182
+2
-2
@@ -63,10 +63,10 @@ if ($clearsearch) {
|
||||
|
||||
if ($hide) {
|
||||
require_sesskey();
|
||||
$DB->set_field('badge_issued', 'visible', 0, array('id' => $hide));
|
||||
$DB->set_field('badge_issued', 'visible', 0, array('id' => $hide, 'userid' => $USER->id));
|
||||
} else if ($show) {
|
||||
require_sesskey();
|
||||
$DB->set_field('badge_issued', 'visible', 1, array('id' => $show));
|
||||
$DB->set_field('badge_issued', 'visible', 1, array('id' => $show, 'userid' => $USER->id));
|
||||
} else if ($download && $hash) {
|
||||
require_sesskey();
|
||||
$badge = new badge($download);
|
||||
|
||||
Reference in New Issue
Block a user