-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 1.1.0: Enable DAG switch via API, disable config for superusers
New functionality for release 1.1.0: * Enable DAG switch via API * Diisable DAG-user mapping config for superusers (it is not applicable because superusers always see all records) Bug fix: * JSON encode quotes in DAG names when rwiting to var in User Rights page
- Loading branch information
Luke Stevens
committed
Sep 4, 2018
1 parent
5f8e52e
commit 90191ae
Showing
6 changed files
with
123 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* REDCap External Module: DAG Switcher | ||
* @author Luke Stevens, Murdoch Children's Research Institute | ||
* Switch current user to DAG supplied | ||
*/ | ||
error_reporting(0); | ||
header("Content-Type: application/json"); | ||
|
||
try { | ||
if (!isset($_POST['dag'])) { echo json_encode(array('result'=>'No dag supplied')); } | ||
$result = $module->apiDagSwitch('RestUtility', $_POST['dag']); | ||
} catch (Exception $ex) { | ||
http_response_code(500); | ||
$result = $ex->getMessage(); | ||
} | ||
echo json_encode(array('result'=>$result)); |