Exemplo n.º 1
0
 public function __construct(Category $category)
 {
     parent::__construct($category);
     $p = new \Permissions($category);
     if ($p->canAddCategoryTreeNode()) {
         $this->addItem(new AddCategoryItem($category));
     }
     if ($p->canAddTopicTreeNode()) {
         $this->addItem(new AddTopicItem($category));
     }
     if ($p->canEditTreeNode()) {
         $this->addItem(new EditCategoryItem($category));
     }
     if ($p->canDuplicateTreeNode()) {
         $this->addItem(new CloneItem($category));
     }
     if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
         $this->addItem(new DividerItem());
     }
     if ($p->canEditTreeNodePermissions()) {
         $this->addItem(new EditPermissionsItem($category));
     }
     if ($p->canDeleteTreeNode()) {
         $this->addItem(new DeleteItem($category));
     }
 }
Exemplo n.º 2
0
 public function __construct(FileFolder $folder)
 {
     parent::__construct();
     $p = new \Permissions($folder);
     if ($p->canEditTreeNode()) {
         $this->addItem(new EditFolderItem($folder));
     }
     if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
         $this->addItem(new DividerItem());
     }
     if ($p->canEditTreeNodePermissions() && \Config::get('concrete.permissions.model') != 'simple') {
         $this->addItem(new EditPermissionsItem($folder));
     }
     if ($p->canDeleteTreeNode()) {
         $this->addItem(new DeleteItem($folder));
     }
 }
Exemplo n.º 3
0
 public function __construct(Topic $topic)
 {
     parent::__construct($topic);
     $p = new \Permissions($topic);
     if ($p->canEditTreeNode()) {
         $this->addItem(new EditTopicItem($topic));
     }
     if ($p->canDuplicateTreeNode()) {
         $this->addItem(new CloneItem($topic));
     }
     if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
         $this->addItem(new DividerItem());
     }
     if ($p->canEditTreeNodePermissions()) {
         $this->addItem(new EditPermissionsItem($topic));
     }
     if ($p->canDeleteTreeNode()) {
         $this->addItem(new DeleteItem($topic));
     }
 }
Exemplo n.º 4
0
 public function __construct(Group $group)
 {
     parent::__construct($group);
     $p = new \Permissions($group);
     if ($p->canEditTreeNode()) {
         $url = \URL::to('/dashboard/users/groups', 'edit', $group->getTreeNodeGroupID());
         $this->addItem(new LinkItem($url, t('Edit Group')));
     }
     if ($p->canEditTreeNodePermissions()) {
         $this->addItem(new EditPermissionsItem($group));
     }
     if ($p->canDeleteTreeNode()) {
         $this->addItem(new DeleteItem($group));
     }
 }
Exemplo n.º 5
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\Tree\Node\Node as TreeNode;
if ($_REQUEST['treeNodeID'] > 0) {
    $node = TreeNode::getByID($_REQUEST['treeNodeID']);
    $np = new Permissions($node);
    if ($np->canEditTreeNodePermissions()) {
        Loader::element('permission/details/tree/node', array("node" => $node));
    }
}
Exemplo n.º 6
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$node = \Concrete\Core\Tree\Node\Node::getByID(Loader::helper('security')->sanitizeInt($_REQUEST['treeNodeID']));
$np = new Permissions($node);
if (is_object($node) && $np->canEditTreeNodePermissions()) {
    ?>

<div class="ccm-ui">
	<?php 
    Loader::element('permission/lists/tree/node', array('node' => $node));
    ?>
</div>

<?php 
}