// Check if userid exists
        if (!isset($attributes[$useridattr])) {
            throw new Exception('User ID is missing');
        }
        $userid = $attributes[$useridattr][0];
    } else {
        SimpleSAML_Utilities::redirect(SimpleSAML_Module::getModuleURL('janus/index.php'));
    }
    // Get the user
    $user = new sspmod_janus_User($janus_config->getValue('store'));
    $user->setUserid($userid);
    $user->load(sspmod_janus_User::USERID_LOAD);
    $et = new SimpleSAML_XHTML_Template($config, 'janus:exportentities.php', 'janus:exportentities');
    $et->data['user_type'] = $user->getType();
    $et->data['uiguard'] = new sspmod_janus_UIguard($janus_config->getValue('access'));
    $et->data['types'] = $util->getAllowedTypes();
    $et->data['states'] = $janus_config->getArray('workflowstates');
    $et->data['external'] = $janus_config->getArray('export.external');
    $et->data['header'] = 'JANUS';
    if (isset($_GET['msg'])) {
        $et->data['msg'] = $_GET['msg'];
    }
    $et->show();
    exit;
}
$ssp_metadata = '// Metadata for state "' . $export_state . '"';
// Generate metadata
try {
    $maxCache = $janus_config->getValue('maxCache', NULL);
    $maxDuration = $janus_config->getValue('maxDuration', NULL);
    $entities = $util->getEntitiesByStateType($export_state, $export_type);
예제 #2
0
} else {
    echo '<input type="hidden" name="entity_workflow" value="' . htmlspecialchars($wfstate) . '" />';
    echo $this->data['workflowstates'][$wfstate]['name'][$this->getLanguage()];
}
?>

                        </td>
                    </tr>
                    <tr>
                        <td><?php 
echo $this->t('admin_type');
?>
:</td>
                        <td>
                        <?php 
$enablematrix = $util->getAllowedTypes();
if ($securityContext->isGranted('changeentitytype', $entity)) {
    echo '<select name="entity_type">';
    foreach ($enablematrix as $typeid => $typedata) {
        if ($typedata['enable'] === true) {
            if ($this->data['entity_type'] == $typeid) {
                echo '<option value="' . htmlspecialchars($typeid) . '" selected="selected">' . htmlspecialchars($typedata['name']) . '</option>';
            } else {
                echo '<option value="' . htmlspecialchars($typeid) . '">' . htmlspecialchars($typedata['name']) . '</option>';
            }
        }
    }
    echo '</select>';
} else {
    echo $enablematrix[$this->data['entity_type']]['name'];
    echo '<input type="hidden" name="entity_type" value ="' . $this->data['entity_type'] . '" />';
예제 #3
0
 }
 // Check for permission
 if (!$access) {
     header("HTTP/1.1 403 Permission not granted");
     exit;
 }
 // Get ignore errors
 if (isset($_GET['ignoreerrors'])) {
     if ($_GET['ignoreerrors'] == 'on') {
         $md_options['ignore_errors'] = true;
     }
 }
 // Get types
 if (isset($_GET['type'])) {
     $type = (array) $_GET['type'];
     $md_options['types'] = array_intersect_key($util->getAllowedTypes(), array_flip($type));
     foreach ($md_options['types'] as $key => $val) {
         if (!$val['enable']) {
             unset($md_options['types'][$key]);
         }
     }
     $md_options['types'] = array_keys($md_options['types']);
     if (empty($md_options['types'])) {
         $syntaxerrors[] = 'No permissable type given';
     }
 } else {
     // Type not parsed
     $syntaxerrors[] = 'No permissable type given';
 }
 // Get state
 if (isset($_GET['state'])) {