Trac 工作流阻塞
有没有办法根据用户角色阻止给定的更改?
例如,我不希望任何开发人员能够将票证状态从“开发”更改为“已关闭”。我希望它经过“测试”,并允许“测试”仅对具有测试角色的用户“关闭”。
Is there a way to block a given change based on the user role?
For example, I don't want any developer to be able to change a ticket status from 'development' to 'closed'. I want it to go through 'test', and allow 'test' to 'closed' only to users with the test role.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是对 Trac 工作流程的非常简单的调整。下面引用了添加可选测试的文档:
现在,所有门票在进入“通过”状态之前都必须经过“测试”状态。
为了确保只有某些测试人员可以将票证从“测试”更改为“通过”,请创建一个名为 TICKET_PASS 的新权限(trac 管理员可以在 Web UI 中执行此操作),并将以下内容添加到 trac 的工作流程部分.ini:
pass.permissions = TICKET_PASS
恕我直言,只需要求票证在通过之前经过测试就足够了。任何理性的开发人员都知道,他们不应该将票证从“测试”状态转移到“通过”状态,除非它通过了您所做的任何质量控制。由于他们的行为有历史记录,他们可能会因为不恰当地将门票标记为“通行证”而受到指责。限制权限可能会带来更多麻烦(分散 trac 管理员的注意力),而不是有帮助。
[注意:我必须删除除其中一个文档超链接之外的所有内容,因为我的代表太低了。叹。]
This is pretty straightforward tweak to the Trac Workflow. The documentation for adding optional testing is quoted below:
Now all tickets must go through the "testing" state before the "pass" state.
To ensure that only certain testers can change a ticket from "testing" to "pass", create a new permission called TICKET_PASS (the trac admin can do this in the web UI), and add the following to your the workflow section of your trac.ini:
pass.permissions = TICKET_PASS
IMHO, it's sufficient to just require that tickets go through testing before they pass. Any reasonable developer knows that they shouldn't move a ticket from the "testing" state to the "passing" state unless it's passed whatever quality control you do. And since there's a history of their actions, they can be blamed for inappropriately marking tickets as "pass". Restricting the privileges will probably get in the way (distracting the trac admin) more than it helps.
[NB: I had to remove all but one of the hyperlinks to documentation b/c my rep is too low. Sigh.]