Beispiel #1
0
 public function trigger()
 {
     $page = Page::getByID($this->cID);
     $pk = PermissionKey::getByID($this->pkID);
     $pk->setPermissionObject($page);
     return parent::trigger($pk);
 }
 public function approve(WorkflowProgress $wp)
 {
     $c = Page::getByID($this->getRequestedPageID());
     $ps = $this->getPagePermissionSet();
     $assignments = $ps->getPermissionAssignments();
     foreach ($assignments as $pkID => $paID) {
         $pk = PermissionKey::getByID($pkID);
         $pk->setPermissionObject($c);
         $pt = $pk->getPermissionAssignmentObject();
         $pt->clearPermissionAssignment();
         if ($paID > 0) {
             $pa = PermissionAccess::getByID($paID, $pk);
             if (is_object($pa)) {
                 $pt->assignPermissionAccess($pa);
             }
         }
     }
     $c->refreshCache();
     $wpr = new WorkflowProgressResponse();
     $wpr->setWorkflowProgressResponseURL(BASE_URL . DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $c->getCollectionID());
     return $wpr;
 }
Beispiel #3
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
?>

<?php 
$pk = PermissionKey::getByID($_REQUEST['pkID']);
$pk->setPermissionObject($fileset);
?>

<?php 
Loader::element("permission/detail", array('permissionKey' => $pk));
?>

<script type="text/javascript">
var ccm_permissionDialogURL = '<?php 
echo REL_DIR_FILES_TOOLS_REQUIRED;
?>
/permissions/dialogs/file_set'; 
</script>
Beispiel #4
0
 protected function loadPermissionAssignments()
 {
     $db = Loader::db();
     $r = $db->Execute('select pkID, paID from PagePermissionAssignments where cID = ?', array($this->getPermissionsCollectionID()));
     while ($row = $r->FetchRow()) {
         $pk = PermissionKey::getByID($row['pkID']);
         $pk->setPermissionObject($this);
         $this->permissionAssignments[$row['pkID']] = PermissionAccess::getByID($row['paID'], $pk);
     }
 }
$wp = PageWorkflowProgress::getByID($_REQUEST['wpID']);
if (is_object($wp)) {
	$w = $wp->getWorkflowObject();
	if ($w->canApproveWorkflowProgressObject($wp)) {
		$req = $wp->getWorkflowRequestObject();
		if (is_object($req)) { 
		$c = Page::getByID($req->getRequestedPageID(), 'RECENT');
		?>

<div class="ccm-ui">
<table class="ccm-permission-grid table table-striped">

<? 
$ps = $req->getPagePermissionSet();
foreach($ps->getPermissionAssignments() as $pkID => $paID) { 
	$pk = PermissionKey::getByID($pkID);
	$pk->setPermissionObject($c);
?>
<tr>
	<td class="ccm-permission-grid-name"><strong><?php 
echo $pk->getPermissionKeyName();
?>
</td>
	<td>
	<? $pa = PermissionAccess::getByID($paID, $pk); 
	Loader::element('permission/labels', array('pa' => $pa, 'pk' => $pk))?>
	</td>
</tr>
<? } ?>
</table>
</div>
Beispiel #6
0
 public function getWorkflowRequestPermissionKeyObject()
 {
     return PermissionKey::getByID($this->pkID);
 }