本文整理汇总了PHP中CommonDBTM::getRights方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonDBTM::getRights方法的具体用法?PHP CommonDBTM::getRights怎么用?PHP CommonDBTM::getRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonDBTM
的用法示例。
在下文中一共展示了CommonDBTM::getRights方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$values = parent::getRights();
$values[self::HOMEPAGE] = __('See in homepage', 'monitoring');
$values[self::DASHBOARD] = __('See in dashboard', 'monitoring');
return $values;
}
示例2: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface='central') {
$values = parent::getRights();
unset($values[CREATE]);
return $values;
}
示例3: getRights
function getRights($interface = 'central')
{
$values = parent::getRights();
if ($interface == 'helpdesk') {
unset($values[CREATE], $values[DELETE], $values[PURGE]);
}
return $values;
}
示例4: showFormSetup
/**
* Print the central form for a profile
*
* @param $openform boolean open the form (true by default)
* @param $closeform boolean close the form (true by default)
**/
function showFormSetup($openform = true, $closeform = true)
{
if (!self::canView()) {
return false;
}
echo "<div class='spaced'>";
if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
echo "<form method='post' action='" . $this->getFormURL() . "'>";
}
$dropdown_rights = CommonDBTM::getRights();
unset($dropdown_rights[DELETE]);
unset($dropdown_rights[UNLOCK]);
$rights = array(array('itemtype' => 'Config', 'label' => __('General setup'), 'field' => 'config'), array('itemtype' => 'DisplayPreference', 'label' => __('Search result display'), 'field' => 'search_config'), array('itemtype' => 'Item_Devices', 'label' => _n('Component', 'Components', Session::getPluralNumber()), 'field' => 'device'), array('rights' => $dropdown_rights, 'label' => _n('Global dropdown', 'Global dropdowns', Session::getPluralNumber()), 'field' => 'dropdown'), __('Entity dropdowns'), array('itemtype' => 'Domain', 'label' => _n('Domain', 'Domains', Session::getPluralNumber()), 'field' => 'domain'), array('itemtype' => 'Location', 'label' => _n('Location', 'Locations', Session::getPluralNumber()), 'field' => 'location'), array('itemtype' => 'ITILCategory', 'label' => _n('Ticket category', 'Ticket categories', Session::getPluralNumber()), 'field' => 'itilcategory'), array('itemtype' => 'KnowbaseItemCategory', 'label' => _n('Knowledge base category', 'Knowledge base categories', Session::getPluralNumber()), 'field' => 'knowbasecategory'), array('itemtype' => 'Netpoint', 'label' => _n('Network outlet', 'Network outlets', Session::getPluralNumber()), 'field' => 'netpoint'), array('itemtype' => 'TaskCategory', 'label' => _n('Task category', 'Task categories', Session::getPluralNumber()), 'field' => 'taskcategory'), array('itemtype' => 'State', 'label' => _n('Status of items', 'Statuses of items', Session::getPluralNumber()), 'field' => 'state'), array('itemtype' => 'SolutionTemplate', 'label' => _n('Solution template', 'Solution templates', Session::getPluralNumber()), 'field' => 'solutiontemplate'), array('itemtype' => 'Calendar', 'label' => _n('Calendar', 'Calendars', Session::getPluralNumber()), 'field' => 'calendar'), array('itemtype' => 'DocumentType', 'label' => __('Document type'), 'field' => 'typedoc'), array('itemtype' => 'Link', 'label' => _n('External link', 'External links', Session::getPluralNumber()), 'field' => 'link'), array('itemtype' => 'Notification', 'label' => _n('Notification', 'Notifications', Session::getPluralNumber()), 'field' => 'notification'), array('itemtype' => 'SLA', 'label' => __('SLA'), 'field' => 'sla'));
$this->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Setup')));
if ($canedit && $closeform) {
echo "<div class='center'>";
echo "<input type='hidden' name='id' value='" . $this->fields['id'] . "'>";
echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
echo "</div>\n";
Html::closeForm();
}
echo "</div>";
$this->showLegend();
}
示例5: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$values = parent::getRights();
unset($values[UPDATE], $values[CREATE], $values[READ]);
if ($interface == 'central') {
$values[self::UPDATEALL] = __('Update all');
$values[self::ADDALLTICKET] = __('Add to all tickets');
$values[self::SEEPRIVATE] = __('See private ones');
}
$values[self::ADDGROUPTICKET] = array('short' => __('Add followup (associated groups)'), 'long' => __('Add a followup to tickets of associated groups'));
$values[self::UPDATEMY] = __('Update followups (author)');
$values[self::ADDMYTICKET] = array('short' => __('Add followup (requester)'), 'long' => __('Add a followup to tickets (requester)'));
$values[self::SEEPUBLIC] = __('See public ones');
if ($interface == 'helpdesk') {
unset($values[PURGE]);
}
return $values;
}
示例6: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$values = parent::getRights();
//TRANS: short for : Add users from an external source
$values[self::IMPORTEXTAUTHUSERS] = array('short' => __('Add external'), 'long' => __('Add users from an external source'));
//TRANS: short for : Read method for user authentication and synchronization
$values[self::READAUTHENT] = array('short' => __('Read auth'), 'long' => __('Read user authentication and synchronization method'));
//TRANS: short for : Update method for user authentication and synchronization
$values[self::UPDATEAUTHENT] = array('short' => __('Update auth and sync'), 'long' => __('Update method for user authentication and synchronization'));
return $values;
}
示例7: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
if ($interface == 'helpdesk') {
$values = array(READ => __('Read'));
} else {
$values = parent::getRights();
}
return $values;
}
示例8: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
if ($interface == 'central') {
$values = parent::getRights();
$values[self::RIGHT_GENERATEODT] = __("Order Generation", "order");
$values[self::RIGHT_DELIVERY] = __("Take item delivery", "order");
$values[self::RIGHT_VALIDATION] = __("Order validation", "order");
$values[self::RIGHT_CANCEL] = __("Cancel order", "order");
$values[self::RIGHT_UNDO_VALIDATION] = __("Edit a validated order", "order");
$values[self::RIGHT_GENERATEODT_WITHOUT_VALIDATION] = __("Generate order without validation", "order");
}
$values[self::RIGHT_OPENTICKET] = __("Link order to a ticket", "order");
return $values;
}
示例9: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
if ($interface == 'central') {
$values = parent::getRights();
$values[self::KNOWBASEADMIN] = __('Knowledge base administration');
$values[self::PUBLISHFAQ] = __('Publish in the FAQ');
}
$values[self::READFAQ] = __('Read the FAQ');
return $values;
}
示例10: getRights
function getRights($interface = 'central')
{
$values = parent::getRights();
return $values;
}
示例11: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$values = parent::getRights();
unset($values[READ]);
$values[self::READALL] = __('See all');
$values[self::READMY] = __('See (actor)');
return $values;
}
示例12: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$rights = parent::getRights();
$rights[PluginSimcardProfile::SIMCARD_ASSOCIATE_TICKET] = __('Associable to a ticket');
return $rights;
}
示例13: getRights
/**
* @since version 0.85
*
* @see commonDBTM::getRights()
**/
function getRights($interface = 'central')
{
$rights = parent::getRights();
$rights[self::RIGHT_SIMCARD_OPEN_TICKET] = __('Associable to a ticket');
return $rights;
}
示例14: getRights
function getRights($interface = 'central')
{
$values = parent::getRights();
unset($values[READNOTE], $values[UPDATENOTE], $values[DELETE]);
return $values;
}