Student boss have access to user skills see BT#13587

pull/2487/head
Julio 8 years ago
parent 7f0f5bf4c5
commit a7a1cb02d7
  1. 12
      main/inc/lib/skill.lib.php

@ -895,7 +895,7 @@ class Skill extends Model
/**
* All direct parents
* @param int $skillId
* @return int
* @return array
*/
public function getDirectParents($skillId)
{
@ -1888,7 +1888,7 @@ class Skill extends Model
{
$allowTool = api_get_setting('allow_skills_tool');
if ($allowTool == 'true') {
if ($allowTool === 'true') {
return true;
}
@ -1906,6 +1906,14 @@ class Skill extends Model
if (api_is_platform_admin()) {
return true;
}
if (api_is_student_boss()) {
$isBoss = UserManager::userIsBossOfStudent($currentUserId, $studentId);
if ($isBoss) {
return true;
}
}
$allow = api_get_configuration_value('allow_private_skills');
if ($allow === true) {
if (api_is_teacher()) {

Loading…
Cancel
Save