コード例 #1
0
 function _content($params)
 {
     $content = '';
     //{{{ Explanations
     $content .= '<div>';
     $content .= $GLOBALS['Language']->getText('plugin_docman', 'admin_permissions_instructions');
     $content .= '</div>';
     echo $content;
     //}}}
     $postUrl = $this->buildUrl($params['default_url'], array('action' => 'admin_set_permissions'));
     permission_display_selection_form("PLUGIN_DOCMAN_ADMIN", $params['group_id'], $params['group_id'], $postUrl);
 }
コード例 #2
0
 /**
  * pagePerms - public View
  */
 function _pagePerms($postUrl = '')
 {
     $wp = new PHPWikiPage($_REQUEST['id']);
     $pagename = $wp->getPagename();
     $eM =& EventManager::instance();
     $referenced = false;
     $eM->processEvent('isWikiPageReferenced', array('referenced' => &$referenced, 'wiki_page' => $pagename, 'group_id' => $this->gid));
     if ($referenced) {
         $label = '';
         $eM->processEvent('getPermsLabelForWiki', array('label' => &$label));
         print '<p align="center"><br><b>' . $label . '</b></p>';
     } else {
         print $GLOBALS['Language']->getText('plugin_phpwiki_views_wikiserviceviews', 'set_perm_title');
         if (empty($pagename)) {
             print $GLOBALS['Language']->getText('plugin_phpwiki_views_wikiserviceviews', 'empty_page');
         } else {
             $purifier = Codendi_HTMLPurifier::instance();
             print $GLOBALS['Language']->getText('plugin_phpwiki_views_wikiserviceviews', 'not_empty_page', array($purifier->purify($pagename)));
             permission_display_selection_form("PHPWIKIPAGE_READ", $wp->getId(), $this->gid, $postUrl);
         }
     }
 }
コード例 #3
0
<?php

//
// Codendi
// Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
// http://www.codendi.com
//
//
//
// Originally written by Nicolas Guerin 2005, Codendi Team, Xerox
//
// Simple script to edit document permissions
require_once 'pre.php';
require_once 'www/project/admin/permissions.php';
require '../doc_utils.php';
if (!user_ismember($group_id, "D2")) {
    $feedback .= $Language->getText('docman_admin_index', 'error_perm');
    exit_permission_denied();
}
$docid = $_GET['docid'] ? $_GET['docid'] : $_POST['object_id'];
$query = "select * from doc_data,doc_groups " . "where docid='{$docid}' " . "and doc_groups.doc_group = doc_data.doc_group " . "and doc_groups.group_id = '{$group_id}'";
$result = db_query($query);
$row = db_fetch_array($result);
docman_header_admin(array('title' => $Language->getText('docman_admin_editdocpermissions', 'title')));
echo '<H3>' . $Language->getText('docman_admin_editdocpermissions', 'doc_title') . ': <a href="/docman/display_doc.php?docid=' . $docid . '&group_id=' . $group_id . '">' . $row['title'] . '</a></h3>';
echo '<p>' . $Language->getText('docman_admin_editdocpermissions', 'instructions', array('/docman/admin/editdocgrouppermissions.php?doc_group=' . $row['doc_group'] . '&group_id=' . $group_id)) . '<p>';
$object_id = $docid;
$post_url = '/docman/admin/index.php?docid=' . $docid . '&group_id=' . $group_id;
permission_display_selection_form("DOCUMENT_READ", $object_id, $group_id, $post_url);
docman_footer(array());
コード例 #4
0
 function attachmentPerms()
 {
     $attachmentId = $_GET['id'];
     $wa = new WikiAttachment($this->gid);
     $wa->initWithId($attachmentId);
     echo $GLOBALS['Language']->getText('wiki_views_wkserviews', 'perm_attachment_title', array($this->wikiname));
     echo $GLOBALS['Language']->getText('wiki_views_wkserviews', 'wiki_attachment_perm', array($wa->getFilename()));
     $postUrl = $this->wikiAdminLink . '&view=wikiAttachments&action=setWikiAttachmentPerms';
     permission_display_selection_form("WIKIATTACHMENT_READ", $wa->getId(), $this->gid, $postUrl);
     print '<hr/><p><a href="' . $this->wikiAdminLink . '&view=wikiAttachments">' . $GLOBALS['Language']->getText('wiki_views_wkserviews', 'back_admin') . '</a></p>' . "\n";
 }