[Trac] Starting an external executable from Trac

22 views
Skip to first unread message

Patterson, Candace

unread,
Oct 29, 2012, 8:22:32 AM10/29/12
to trac-...@googlegroups.com
Is it possible to kick off an external executable from within Trac? I created a small GUI for regular modifications of a custom field because I don't want the user to modify the trac.ini file manually. It would be helpful to invoke that GUI from within Trac.

Cooke, Mark

unread,
Nov 1, 2012, 5:29:10 AM11/1/12
to trac-...@googlegroups.com
I am not aware of any way apart from writing a trac plugin (I have done one that uses an external program). However, if you are writing a plugin you might as well do your GUI in that instead of the external app?

Can you expand on what your GUI does ~ it sounds like there might already be a similar plugin available ~ did you search trac-hacks.org?

~ mark c

Patterson, Candace

unread,
Nov 1, 2012, 10:47:06 AM11/1/12
to trac-...@googlegroups.com
I am working on in a Windows environment, and the GUI is written in Visual C++. It allows the user to add, delete, and edit the items in a custom select/dropdown field, and then it saves the modifications to the Trac.ini.

I looked in trac-hacks.org but didn't find anything. Perhaps I wasn't using the correct search terms to find the one you are referring to. Do you have a link to the one you think might work? I would rather use something that is integrated into Trac, but launching from Trac is okay, too.

Thanks!
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Cooke, Mark

unread,
Nov 1, 2012, 11:03:56 AM11/1/12
to trac-...@googlegroups.com
> > -----Original Message-----
> > From: trac-...@googlegroups.com On Behalf Of Patterson, Candace
> > Sent: 29 October 2012 12:23
> > To: trac-...@googlegroups.com
> > Subject: [Trac] Starting an external executable from Trac
> >
> > Is it possible to kick off an external executable from
> > within Trac? I created a small GUI for regular modifications
> > of a custom field because I don't want the user to modify the
> > trac.ini file manually.
> > It would be helpful to invoke that GUI from within Trac.
>
> I am not aware of any way apart from writing a trac plugin (I
> have done one that uses an external program). However, if
> you are writing a plugin you might as well do your GUI in
> that instead of the external app?
>
> Can you expand on what your GUI does ~ it sounds like there
> might already be a similar plugin available ~ did you search
> trac-hacks.org?
>
> ~ mark c
>
> -----Original Message-----
> From: trac-...@googlegroups.com
> [mailto:trac-...@googlegroups.com] On Behalf Of Patterson, Candace
> Sent: 01 November 2012 14:47
> To: 'trac-...@googlegroups.com'
> Subject: RE: [Trac] Starting an external executable from Trac
>
> I am working on in a Windows environment, and the GUI is
> written in Visual C++. It allows the user to add, delete,
> and edit the items in a custom select/dropdown field, and
> then it saves the modifications to the Trac.ini.
>
> I looked in trac-hacks.org but didn't find anything. Perhaps
> I wasn't using the correct search terms to find the one you
> are referring to. Do you have a link to the one you think
> might work? I would rather use something that is integrated
> into Trac, but launching from Trac is okay, too.
>
> Thanks!
>
I did a quick search for `custom` on the front page at trac-hacks and came up with the following:

http://trac-hacks.org/wiki/CustomFieldAdminPlugin

If that is too generic for you, you could always take the source and modify it for your requirements...

~ mark c

RjOllos

unread,
Nov 2, 2012, 10:32:46 AM11/2/12
to trac-...@googlegroups.com
On Thursday, November 1, 2012 7:47:19 AM UTC-7, Patterson, Candace wrote:
I am working on in a Windows environment, and the GUI is written in Visual C++.  It allows the user to add, delete, and edit the items in a custom select/dropdown field, and then it saves the modifications to the Trac.ini.  

I've used the CustomFieldAdminPlugin that Mark has suggested, and it does exactly what you describe.

Patterson, Candace

unread,
Nov 2, 2012, 2:57:13 PM11/2/12
to trac-...@googlegroups.com

Thanks.  I loaded the plugin, and it works.  Is it possible to allow users that do not have admin permissions to access this API?

--

You received this message because you are subscribed to the Google Groups "Trac Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/n1BkqjGC84MJ.

RjOllos

unread,
Nov 2, 2012, 4:25:52 PM11/2/12
to trac-...@googlegroups.com
On Friday, November 2, 2012 11:57:25 AM UTC-7, Patterson, Candace wrote:

Thanks.  I loaded the plugin, and it works.  Is it possible to allow users that do not have admin permissions to access this API?

 If you'd like to allow access to users that don't have TICKET_ADMIN to access the panel, you'll need to modify customfieldadmin/admin.py to replace the two instances of TICKET_ADMIN with some other permission.

p.s. I encourage you to not top post ;)

Patterson, Candace

unread,
Nov 2, 2012, 4:47:03 PM11/2/12
to trac-...@googlegroups.com

Thanks.  I loaded the plugin, and it works.  Is it possible to allow users that do not have admin permissions to access this API?

 If you'd like to allow access to users that don't have TICKET_ADMIN to access the panel, you'll need to modify customfieldadmin/admin.py to replace the two instances of TICKET_ADMIN with some other permission.

 

p.s. I encourage you to not top post ;)

 

Thanks a lot!  Changing the admin.py file worked!

Reply all
Reply to author
Forward
0 new messages