Skip to content
Snippets Groups Projects
  • Martin Haase's avatar
    e818f0b0
    New functions for projectFile (getProjectDescription, setProjectFile,... · e818f0b0
    Martin Haase authored
    New functions for projectFile (getProjectDescription, setProjectFile, createNewProject, getAllProjects) and level (tgAssignedProjects).
    
    Level-descriptions:
    
    Level: 0
    No changes, all projects are returned where the user is a member.
    
    Level: 1
    Only returns projects where the user has the roles Beobachter or Bearbeiter or any public resources are available.
    
    Level: 2
    Only returns projects where the user has the roles Beobachter or Bearbeiter.
    
    Level: 3
    Only returns projects where the user has the role Bearbeiter.
    
    Level: 4
    Only returns projects where the user has the role Projektleiter.
    
    
    
    git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@2781 7c539038-3410-0410-b1ec-0f2a7bf1c452
    e818f0b0
    History
    New functions for projectFile (getProjectDescription, setProjectFile,...
    Martin Haase authored
    New functions for projectFile (getProjectDescription, setProjectFile, createNewProject, getAllProjects) and level (tgAssignedProjects).
    
    Level-descriptions:
    
    Level: 0
    No changes, all projects are returned where the user is a member.
    
    Level: 1
    Only returns projects where the user has the roles Beobachter or Bearbeiter or any public resources are available.
    
    Level: 2
    Only returns projects where the user has the roles Beobachter or Bearbeiter.
    
    Level: 3
    Only returns projects where the user has the role Bearbeiter.
    
    Level: 4
    Only returns projects where the user has the role Projektleiter.
    
    
    
    git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@2781 7c539038-3410-0410-b1ec-0f2a7bf1c452
dropActiveRole.php 1.57 KiB
<?php
// #######################################################
// Author: Markus Widmer
// Creation date: 08.07.2007
// Modification date: 17.07.2007
// Version: 0.1.1
// #######################################################


require_once( "../soapTypes.inc.php" );



// -----------------------------------------------------
// You'll need these services
// -----------------------------------------------------
$soapExtra = new SoapClient( "../wsdl/tgextra.wsdl", Array( "trace" => true ) );


echo "<BODY><HTML>";


if( isset( $_POST['auth'] ) ) {


  // -----------------------------------------------------
  // Now you can try to drop the active role from your session
  // -----------------------------------------------------
  $dropRoleReq = new dropActiveRoleRequest();
  $dropRoleReq->role = $_POST['role'];
  $dropRoleReq->auth = $_POST['auth'];

  echo "Dropping active role...<BR/>";


  try {

    $dropRoleResponse = $soapExtra->tgDropActiveRole( $dropRoleReq );


    echo $soapExtra->__getLastRequest();

    if( $dropRoleResponse->result ) {

      echo "DONE.<BR/>";

    }
    else {

      echo "FAILED.<BR/>";

    }

  }
  catch( SoapFault $f ) {

    echo "SOAP FAULT!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail;

  }

}

echo "<FORM action=\"dropActiveRole.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
echo "Auth: <INPUT type=\"text\" name=\"auth\" value=\"\"><BR>\n";
echo "Role: <INPUT type=\"text\" name=\"role\" value=\"\"><BR/>\n";
echo "<INPUT type=\"submit\" value=\"Commit...\">\n";
echo "</FORM>\n";

echo "</BODY></HTML>";
?>