RE: Adding "Approval" Mechanism

"Andrew Kemp" <[email protected]>
Newsgroups gmane.comp.bug-tracking.gnats.general
Message-ID <[email protected]>
Hi,

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
gnatsweb.pl.

The link I use is

h**p://someserver/cgi-bin/gnats/gnatsweb.pl/1?submittype=mail&pr=%s&cmd=
submit edit&State=approved&database=default&State-Changed-Why=%s
email_approval

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!

Andy.

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

_______________________________________________
Help-gnats mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnats
dbconfig (application/octet-stream, 9.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.