Skip to content

有害部落格同好會

2011/02/28 / php

限制 mantis 功能 , 只有被指派的 issue (bug) handler 才能更新狀態

目的: mantis 預設 handler 可處理任一 issue (bug), 修改程式功能, 限制只有被指派的 issue (bug) handler 才能更新狀態

註: 需回收 assign sponsor 權限給更高權限者, ex. , manager

mantis 版本 1.2.a03

開啟 root 目錄底下, 檔案: bug_change_status_page.php

搜尋

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$t_status_label = str_replace( " ", "_", MantisEnum::getLabel( config_get( 'status_enum_string' ), $f_new_status ) );
 
在這一行之前, 插入以下程式碼
 
/* 修改 -- 2009.04.20 */
/*  限制只有 owner 以及有權限的人(assign_sponsor)才可以 access*/
if (( $f_handler_id != NO_USER ) ) {
if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) {
if ( access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) {
if (!(bug_get_field( $f_bug_id, 'handler_id' ) == auth_get_current_user_id() ))
{
## 權限不足, stop
trigger_error( ERROR_HANDLER_ACCESS_TOO_LOW, ERROR );
}
 
}
}
}
/* 修改 -- 2009.04.20 */

$t_status_label = str_replace( " ", "_", MantisEnum::getLabel( config_get( 'status_enum_string' ), $f_new_status ) ); 在這一行之前, 插入以下程式碼 /* 修改 -- 2009.04.20 */ /* 限制只有 owner 以及有權限的人(assign_sponsor)才可以 access*/ if (( $f_handler_id != NO_USER ) ) { if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) { if ( access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) { if (!(bug_get_field( $f_bug_id, 'handler_id' ) == auth_get_current_user_id() )) { ## 權限不足, stop trigger_error( ERROR_HANDLER_ACCESS_TOO_LOW, ERROR ); } } } } /* 修改 -- 2009.04.20 */

Post navigation

Previous Post:

簡易遮蔽網頁內箝式廣告

Next Post:

自訂 function: get local ip

分類

  • 新奇有趣の搶先報導
    • Raspberry Pi
    • 手機相關
    • 推薦軟體
    • 新鮮有趣
    • 生活資訊
  • 想破腦袋の程式技巧
    • Oracle EBS
    • Database
    • Excel, VBA
    • php
    • JavaScript, VBScript
    • VS.NET
    • Others
    • Windows
    • SAP
  • 撩動心弦の短文小品
  • 聚沙成塔の理財守則
  • 不可不知の職場實錄
  • 剎那永恆の生活翦影

近期文章

  • 受保護的內容: 如何透過Personalize功能呼叫另一form來回傳值
  • Win10 / 8 / 7 無法安裝 SSD
  • 受保護的內容: 樹梅派+遠端連線
  • EBS R12 取得客戶的phone, email, URL資料
  • 受保護的內容: 管控Workflow Administrator Role

友站

  • Masaya396's 協奏曲
  • 老塗的咁仔店

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

Tag Cloud

你目前使用的瀏覽器不支援 HTML5 的 CANVAS 標籤。

  • EBS 11.5.10
  • Oracle EBS
  • MySql
  • excel
  • VBA
  • javascript
  • EBS 12.1.3
  • CSS
  • VB6
  • 感情
  • HTC
  • php
  • SAP
  • LDAP
  • Oracle DB
  • Win7
  • SQL
  • WinXP
  • 管理
  • VB.Net
© 2025 有害部落格同好會 - Powered by SimplyNews