Skip to content

Commit

Permalink
Tried to fix missing server access level issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mullen2 committed Dec 21, 2021
1 parent eae04d3 commit faed6ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RedCapEtlModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ public function deleteUser($username)
\REDCap::logEvent(self::CHANGE_LOG_ACTION, $details, null, null, self::LOG_EVENT);
}

/**
* Returns servers with the specified specific access level. If 'none' is
* specified for the specific access level, then all servera are returned.
*/
public function getServersViaAccessLevels($specificLevel = 'none')
{
#get server names
Expand Down
5 changes: 5 additions & 0 deletions classes/ServerConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ public function fromJson($json)
foreach (get_object_vars($this) as $var => $value) {
$this->$var = $object->$var;
}

# If access level is unset, set it to public
if (empty($this->accessLevel)) {
$this->accessLevel = 'public';
}
}
}

Expand Down

0 comments on commit faed6ae

Please sign in to comment.