Re: [Trac] Obfuscate Usernames By Role

2014-10-11 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11.10.2014 01:43, akor...@smartsoftwareinc.com wrote:
> I need a way to convert usernames to roles everywhere that usernames are
> displayed in the application. So, users in my group will be able to see
> my name as the ticket reporter/owner, in the change history section, etc
> but users in other groups will only see "Developer" (my group name) in
> those places. ...
> 
> Does anyone have any ideas of how I might go about accomplishing this
> task? Is there some centralized ticket object/class that I can tie into,
> perhaps override a getter/setter so I can manipulate this data
> everywhere it is shown in the application? Can I accomplish this with
> additional fields and permission checks, so one group sees the username
> fields and another sees corresponding user role fields?

Have a look at Chrome.format_author() method in trac.web.chrome, that is
the canonical place, but especially watch out for plugins that might not
respect this convention.

Steffen Hoffmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlQ48rUACgkQ31DJeiZFuHeAqACfc5TDW31jXLdiUJrSoKDRy/6J
xs8An1+sDhfpF+RzgyG5PouWpeVjyfS5
=TqBa
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Obfuscate Usernames By Role

2014-10-11 Thread akorkki
I need a way to convert usernames to roles everywhere that usernames are 
displayed in the application. So, users in my group will be able to see my 
name as the ticket reporter/owner, in the change history section, etc but 
users in other groups will only see "Developer" (my group name) in those 
places. I'm focused on the ticket edit page for now, although my solution 
will eventually need to expand to the ticket search and timeline pages, and 
probably others. I've found a few references to ITicketManipulator's 
prepare_ticket and prepare_ticket_for_render, but neither appear to work in 
version 0.12. We are willing to attempt updating to the latest version of 
Trac but I'm not sure yet that it's capable of accomplishing our goal 
either.

Does anyone have any ideas of how I might go about accomplishing this task? 
Is there some centralized ticket object/class that I can tie into, perhaps 
override a getter/setter so I can manipulate this data everywhere it is 
shown in the application? Can I accomplish this with additional fields and 
permission checks, so one group sees the username fields and another sees 
corresponding user role fields?

Any help would be greatly appreciated.
~Korkki

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Obfuscate Usernames By Role

2014-10-11 Thread akorkki
Hi all, first time poster and newbie in Trac configuration/plugin writing 
(although I've been using the application for years).

I use Trac as part of a software development company. We've recently 
decided to let clients view the environment as well as employees and 
subsequently realized we need to be able to obscure the developer's 
usernames from clients. The idea is users in one group (employees) would 
see the actual username while users in another (clients) would just see 
"Developer" or "Lead". This change will have to happen in many places but 
I've specifically been focused on the ticket edit page for now, just trying 
to find a hook for a plugin that could convert the reporter/owner usernames 
to role names before displaying them. I've found a few references to 
ITicketManipulator's prepare_ticket and prepare_ticket_for_render but 
neither appear to work and I'm out of ideas.

Does anyone have any ideas how I might go about implementing this? Is there 
a centralized ticket object or class where I can override a getter/setter 
or otherwise manipulate these values before they are displayed? Ideally I 
find a solution that handles the ticket's reporter/owner and change history 
as well as the search page, timeline, csv/tsv ticket export, etc.

Any help would be greatly appreciated
~Korkki

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.