Rexxer

Some tips for me and other

TRAC + strict permissions

Once PM ask me to configure strict access to a project in TRAC for user.
He can have access only for “New ticket” and view only own tickets.

Firstly, I have created the user account and add him to the special group.

I assigned the next permissions for this group:

Result:
part of trac.ini (11.5)

[authz_policy]
authz_file = c:apachetracprojectsifstconfauthzpolicy.conf                #pick file with policy

[components]
authz_policy.* = enabled      #turning on policy

[mainnav]
tickets.href = /report/7        #set navigation button “View tickets” to report “My tickets” by default

authzpolicy.conf

[wiki:Documents]
admin1 = WIKI_ADMIN
admin2 = WIKI_ADMIN
* = “”

[milestone:Test]
user = MILESTONE_VIEW

[milestone:*]
user = “”

[report:7]
user = REPORT_VIEW

[report:*]
user = “”

But … I found some issues with permissions and understood that this way incorrect.

I looked up again and found this: http://trac-hacks.org/wiki/PrivateTicketsPlugin

So, my trac.ini became:

[components]
privatetickets.* = enabled

[mainnav]
tickets.href = /report/6

[trac]
permission_policies = PrivateTicketsPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy

[privatetickets]
group_blacklist =

And I added the permission: TICKET_VIEW_REPORTER (it turn up after installing the plugin) for group.

Leave a Reply