Noah Kantrowitz | 1 Jun 2009 01:39
Gravatar

[Trac-dev] Re: What about a "self" special user?


Just for the record in case someone finds this thread on Google or  
whatnot, there is a plugin called SelfDelete on trac-hacks that  
simulates this for 0.10.

--Noah

On May 31, 2009, at 10:28 AM, Matt Good wrote:

>
> Sounds ok, though please call it "author" for consistency with the
> "author" field of the model objects.
>
> On May 29, 1:54 am, Emmanuel Blot <manu.b... <at> gmail.com> wrote:
>> Hi,
>>
>> I was wondering whether it could make sense, to add to the two  
>> special
>> users "anonymous" and "authenticated" the new special user "self" in
>> Trac.
>>
>> For example, a regular user may attach a file to a Wiki Page, but the
>> admin does not want him to be able to remove/delete files from the
>> Wiki.
>> The trouble is that this very user cannot remove his own files.
>>
>> Even worse: if he want to update a file he has previously attached to
>> a page (or a ticket), he cannot either: Trac rejects an attachment
>> replacement request with "ATTACHMENT_DELETE permission required"
>> error. This is weird.
(Continue reading)

Erik Bray | 1 Jun 2009 19:08
Picon

[Trac-dev] Re: template problem


On Fri, May 29, 2009 at 11:31 AM, eri x <ermaltesi <at> gmail.com> wrote:
> Hi, i am creating a template for a plugin but i have a problem, in the
> template i created a select menu which visualize some information and it
> works correctly,
> now the problem is that i don't know how to read the selected value and put
> it in  a variable using python, i need it in python because there are other
> funtions in python inside the html file that use this variable.
>
>     <select name='select_ticket'>
>         <option value="default">deafult workflow</option>
>         <option py:for="nomi in template.ticket_types" value="${nomi}">
> ${nomi} workflow</option>
>     </select>
>
> Regards Ermal

When you submit a form, the values for all the form fields are in
req.args, which is a dictionary-like object.

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

Erik Bray | 1 Jun 2009 19:27
Picon

[Trac-dev] Re: Overriding IAuthenticator


On Sat, May 30, 2009 at 5:23 AM, Scott <scott <at> desura.com> wrote:
>
> Erik, I've actually changed the code quite a bit but the problem i'm
> having still exists.
>
> You see trac (for whatever reason) doesn't call the authenticate()
> method once per request, it calls it quite a few times - which is why
> i'm having this problem. As for cookies, well i'm using my sites login
> cookies to log the users into trac, so they can jump between my site
> and trac seamlessly and without needing to re-login. My issue now is
> two fold, I want to make it so subsequent calls to this method return
> the users authenticated username (so i'm not doing multiple slow XML
> HTTP requests every load) and I also want to display login errors by
> calling chrome.add_notice(req, "Error loading login API.") but it
> seems anytime you use the "req" variable in this function trac goes
> into an infinite loop.
>
> help would be very much appreciated.

Yes, it calls your authenticate() every time req.authname is looked
up.  req.authname actually returns the result of a function call,
which loops through all Components that implement IAuthenticator and
returns the result of their authenticate() methods until one of them
returns something, or the list is exhausted (in which case it returns
'anonymous').  Look at trac.web.main.  So if you're checking
req.authname in your authenticate() method, then it will go into an
infinite loop.  Obviously you shouldn't do that, because your method
is what's *providing* the value for req.authname.

(Continue reading)

Lance Hendrix | 1 Jun 2009 21:47

[Trac-dev] Introduction & Looking to contribute


I would like to introduce myself to the Trac Dev team and ask about the 
status of several items I am interested in from the 
http://trac.edgewall.org/wiki/TracDev/Proposals page.  I have read most 
of the documentation on the http://trac.edgewall.org/wiki/TracDev and 
also looked over the ToDo and ticket lists.  I have also done a 
preliminary review of the code in order to familiarize myself with what 
you guys have done.  I am an enthusiastic champion of Trac and believe 
that Trac coupled with Eclipse Mylyn is one of the best project 
management tools available today (and one of the only competitors to 
Microsoft's Team Systems product).

If you are interested, my background is posted on my website at 
http://www.lancehendrix.com/about/index.html.

I would assume it would be best for me to start with assisting with 
(issue) tickets or testing, but even after reviewing the existing 
tickets I am unsure where to start as I don't want to work on something 
that is already being addressed or that is not a current priority, so a 
few pointers would be welcomed.

I also reviewed the 
http://trac.edgewall.org/wiki/TracObjectModelProposal and have an 
interest in this as I recently completed a project where I implemented a 
similar idea (common attributes like id, shortname, displayname) so that 
the system could operate "generically" on most any type of "entity" 
within the system.  Albeit, this was implemented in PHP rather than 
Python.  However, I assume, as stated above that I would need to "get my 
feet wet" or "prove myself" by making contributions to smaller items 
before being taken seriously for tackling something of this size.
(Continue reading)

Christian Boos | 2 Jun 2009 17:33
Picon

[Trac-dev] Re: Introduction & Looking to contribute


Hello Lance,

We would be glad to get some help and your introductory mail sounds 
promising ;-)

The Trac project and its 900+ opened tickets has definitely some room 
for new contributors (and renewed contributions from old contributors 
are still very much appreciated ;-) ).

Lance Hendrix wrote:
> I would like to introduce myself to the Trac Dev team and ask about the 
> status of several items I am interested in from the 
> http://trac.edgewall.org/wiki/TracDev/Proposals page.  I have read most 
> of the documentation on the http://trac.edgewall.org/wiki/TracDev and 
> also looked over the ToDo and ticket lists.  I have also done a 
> preliminary review of the code in order to familiarize myself with what 
> you guys have done.  I am an enthusiastic champion of Trac and believe 
> that Trac coupled with Eclipse Mylyn is one of the best project 
> management tools available today (and one of the only competitors to 
> Microsoft's Team Systems product).
>
> If you are interested, my background is posted on my website at 
> http://www.lancehendrix.com/about/index.html.
>
> I would assume it would be best for me to start with assisting with 
> (issue) tickets or testing, but even after reviewing the existing 
> tickets I am unsure where to start as I don't want to work on something 
> that is already being addressed or that is not a current priority, so a 
> few pointers would be welcomed.
(Continue reading)

eri x | 3 Jun 2009 10:15
Picon

[Trac-dev] Re: template problem

Thank you Erik, you saved me.

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

shookie | 3 Jun 2009 04:37
Picon

[Trac-dev] ContextMenu Configuration


Hello,
I want to hide the wiki-ctxtnav from anonymous users on my page.

As far as I have seen so far, there is no current way to do this, unless MenusPlugin provides some way for that.
But I have found no way to refer to ctxtnav entries in the trac.ini, since add_ctxtnav doesn't require a
name for the entries, just a label and a link and a title.

Now, there are several options that functionality can be added.

I could write a Filter Plugin, that removes any cntxnav entries under certain conditions.
I could add a javascript, that looks at the page structure and then does the required adjustments, (a pretty
ugly hack, don't need to say that I guess).
A new permission could be added, that is checked for in _wiki_cntxnav in wiki/web_ui.py
Or just a new wiki config option anonymous_hide_ctxtnav could be introduced, that is checked for in
_wiki_cntxnav in wiki/web_ui.py together with the login state

Now, if it is just me who wants that possibilty, I should write that plugin or that script.
But if more people would want to hide from regular visitors, that the site is actually a wiki, the it should be
done in the wiki code itself.
In that case it would probably also be nice to be able to configure the wiki root path that triggers the
WikiModule handler to something else but */wiki, haven't looked whether that requires more changes than
a configurable regex in match_request in wiki/web_ui.py. But changes in the Wiki-Link code are likely.

Regards

Jan Schukat

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

zineb BENAMEUR EL YOUBI | 3 Jun 2009 13:28
Picon

[Trac-dev] Problem with the reports

Hello,
Recently, I made some modifications to my Trac , I added some new fields and delete some ones in trac.ini file.
In my section "tickets" where i can view the reports, there is a very big problem.
When i add the new fields to my SQL query, the old tickets (whitch were created before the modifications) disapeare from the query result.
Please, do you have any idea how i can resolve this problem?

Thanks,
Z. BEN

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

Lance Hendrix | 3 Jun 2009 21:05

[Trac-dev] Re: Introduction & Looking to contribute


Thank you for the quick and elaborate response!  I wanted to follow up 
on this great email with a status of where I am and express my 
appreciation for your direction.  I have edited out a bit of this in 
order to shorten the email so that it isn't too long... 

My initial efforts have been to get a development environment up and 
running (I have done several user installations, but obviously never 
setup a "trac development environment).  I initially started out 
attempting to do this on Windows (Vista x64 to be exact), but ran into 
some issues and decided to switch over to Linux (Gentoo is my current 
preference with regard to distro), on which it was much easier to get 
going.  I still have quite a few failing tests in trunk and I am not 
sure if this is a result of issues with the environment (which I assume 
it is) or something else, but I will take the determination of these 
issues as part of my "training" in Trac development and figure them out 
on my own.

More comments are in-line:

Christian Boos wrote:
> Hello Lance,
>
>   
> Starting to work on the 0.11.x bug reports is where the contributions 
> will be the most immediately useful.
> I think 0.11.5 is mostly ready to go, though among the opened tickets, 
> there are still a few outstanding ones that would be better fixed in 
> 0.11.5 rather than later (e.g. #7490, #4245). In general, pick any 
> ticket in 0.11.5 or 0.11.6 that match your center of interest, and go 
> for it: verify that an issue is reproducible, test an already proposed 
> fix, review existing patches, and of course, propose your own fixes. By 
> commenting on the tickets, you'll usually get feedback from the other 
> developers pretty quickly.
>   
I am currently looking into #7490 which is very interesting and also 
in-line with some of my professional experience which has focused on 
performance and scalability of platforms and applications.  In my 
preliminary review and attempt to understand the issue as it relates to 
#7490, I have found a couple of things that I wanted to get feedback on 
(let me know if this is better placed into the comments of the issue, 
but it is quite deep into the code and most of the discussion on the 
ticket is at a "higher" level)...

*  The a major change from Trac-10 to Trac-11 was leveraging Genshi
*  One of the initial issues reported and resolved was ticket #6614 - 
Memory leak using Apache (I am still sorting through the details of this 
ticket)
*  In reviewing the code, one of the changes related to ticket #6614 was 
to explicitly force a garbage collection at the end of request processing

My current thinking is that the explicit garbage collection (which is 
synchronous with the user request) is what is causing the (at least 
perceived) performance problem (whether this is related to Genshi or not 
is still unknown based on my preliminary testing).  I have not been able 
to reproduce the problem as yet, but I also have a few suspicions as to 
why and am currently svnsync(ing) a repo that has more history and data 
to see if that allows me to better repro the problem.  Once I can repro 
then I am sure we can fix...

*  I also assume that part of the issue why this hasn't been addressed 
is that we still don't know exactly why/how this occurs? 
*  Has anyone been able to repro the issue in a development environment?
*  Is anyone else actively working on this issue (that I should be 
collaborating with)? 
*  What do we know (or don't) know that might not be in the ticket 
discussion?

If someone else is actively working on this, then I can act as the 
"grunt" and feel free to offload any boring, repetitious, and/or tedious 
activities to me and I can report back my findings rather than 
(potentially) wasting your time with the tedious work of trying to 
reproduce and/or test...
> For 0.12, the main focus is still i18n. Also, Remy Blank and me have 
> been quite active on the MultipleRepositorySupport branch, which is 
> nearing completion and is very likely to be ready for 0.12. There were 
> several other improvements made to the custom queries and SQL reports, 
> the timeline and the wiki, but not that many compared to 0.11, so if 
> there's still any particular improvement you'd like to see in 0.12, feel 
> free to work on it.
>
> Among the other recent activity, there was some effort done on the 
> testing infrastructure, where we recently added the possibility to run 
> the unit and functional tests with alternate DB backends (i.e. not just 
> the in-memory SQLite database).
>   
> Btw, although a bit involved, getting familiar with our testing 
> infrastructure is a good way to start, as running the test suite will 
> help you gain confidence in your changes when you tweak the code. By 
> going into trunk/doc/, you should be able to build the developer guide 
> which contains some details for getting the test environment up and 
> running. Note that when I contributed to this documentation, I was 
> pleased about how convenient it was to use Sphinx for this job, and so I 
> wished to extend the developer guide even further. I think it would be 
> interesting to have both someone familiar with the code base /and/ 
> someone discovering it, when writing such a guide, as this give you the 
> possibility to focus on what's really important to document. So if 
> you're interested, that's also one area where you could help by asking 
> questions and pointing to the parts of the API which need to be 
> documented the most.
>   
I like the testing infrastructure and once I get a little more familiar 
with it, I will be in a better position to provide some feedback or help 
improve the documentation which is an excellent suggestion.

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

Remy Blank | 3 Jun 2009 21:37
Picon
Favicon

[Trac-dev] Re: Introduction & Looking to contribute

Lance Hendrix wrote:
> My initial efforts have been to get a development environment up and 
> running

...snip...

> I still have quite a few failing tests in trunk and I am not 
> sure if this is a result of issues with the environment (which I assume 
> it is) or something else,

Post the errors you get, I should be able to assist. I am also
developing on Gentoo, and have set up a few environments quite recently.
Are you using virtualenv? If not, you should.

-- Remy


Gmane