[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Adding "Approval" Mechanism

From: Andrew Kemp
Subject: RE: Adding "Approval" Mechanism
Date: Thu, 25 Nov 2004 17:21:43 -0000


I have cobbled something into gnatsweb to support an approval system
through emails. Firstly I edited the dbconfig file fairly heavily so
that gnatsweb sends HTML emails. The main mail that is sent out is
whenever there is an audit trail change.

In our local Gnats DB we have a state "awaiting-approval" as well as
"approved" and a few other new ones. For each possible state I create a
separate DIV in the HTML mail and use inline CSS style to say which one
is displayed. This is controlled with CSS lines in the dbconfig like

   div { display: none }\n\
   div.%s { display: inline }\n\

and the format element used is 'State'.

In the "awaiting-approval" state, the mail contains two big buttons for
Accept / Reject which the originator can click on. This uses an
additional field in the Gnats link to bypass the normal login and use an
account which has edit access. This required a small hack to

The link I use is

submit edit&State=approved&database=default&State-Changed-Why=%s

It is the "submittype=mail" field that I use to bypass the login. I know
that this provides a potential edit backdoor, but Gnats security is not
great anyway and I trust my users who are all local :-)

Cheesey, but it works!


I have attached my dbconfig if you want to see what I have done. You
will have to add your own images.

Attachment: dbconfig
Description: dbconfig

reply via email to

[Prev in Thread] Current Thread [Next in Thread]