getRights() 공개 메소드

Get rights for an item _ may be overload by object
public getRights ( $interface = 'central' ) : array
$interface string (defalt 'central')
리턴 array of rights to display
 /**
  * @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
0
   /**
    * @since version 0.85
    *
    * @see commonDBTM::getRights()
    **/
   function getRights($interface='central') {

      $values = parent::getRights();
      unset($values[CREATE]);

      return $values;
   }
예제 #3
0
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     if ($interface == 'helpdesk') {
         unset($values[CREATE], $values[DELETE], $values[PURGE]);
     }
     return $values;
 }
예제 #4
0
 /**
  * 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();
 }
 /**
  * @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
0
 /**
  * @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
0
 /**
  * @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
0
 /**
  * @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
0
 /**
  * @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
0
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     return $values;
 }
예제 #11
0
 /**
  * @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
0
 /**
  * @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;
 }
 /**
  * @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
0
 function getRights($interface = 'central')
 {
     $values = parent::getRights();
     unset($values[READNOTE], $values[UPDATENOTE], $values[DELETE]);
     return $values;
 }