Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#8890 closed enhancement (fixed)

Can't add BROWSER_VIEW with blank repository_dir in trac.ini

Reported by: philip@… Owned by: Remy Blank
Priority: normal Milestone: 0.12-multirepos
Component: admin/console Version: none
Severity: minor Keywords: permission
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

When I create a new Trac instance and don't fill in the repository dir, I can't add BROWSER_VIEW permission to groups.

There have been a number of tickets filed in relation to removing permissions (e.g. #2546, #3688, #4291) but I couldn't find a ticket related to adding permissions.

Example with my comments in (parens):

# trac-admin zzz initenv
(default options chosen, much output snipped)
# grep repository_dir zzz/conf/trac.ini
repository_dir = 
# trac-admin zzz permission add new_group TICKET_VIEW
(succeeded)
# trac-admin zzz permission add new_group BROWSER_VIEW
Command failed: BROWSER_VIEW is not a valid action.
# vim zzz/conf/trac.ini
# grep repository_dir zzz/conf/trac.ini
repository_dir = /this/path/does/not/exist
# trac-admin zzz permission add new_group BROWSER_VIEW
(succeeded)

On one hand this makes sense since BROWSER_VIEW is irrelevant when there's no repository to browse. On the other hand it is also harmless to set this permission bit when there's no repos to browse, so why not permit it? Allowing BROWSER_VIEW to be independent of repository_dir would make my life as an administrator easier.

For instance, my standard script to create a Trac instance creates some new groups. Trac's current behavior requires my script to add BROWSER_VIEW conditionally depending on repository_dir. Furthermore, if I later populate the repository_dir in trac.ini, I have to remember to go back and add BROWSER_VIEW to the groups that should have it.

Also, the current restriction means that a new Trac instance with a blank repository_dir is created in an inconsistent state, because anonymous has BROWSER_VIEW permission. To add to the confusion, one can remove BROWSER_VIEW from anonymous but can't add it back:

# trac-admin zzz permission remove anonymous BROWSER_VIEW
# trac-admin zzz permission add anonymous BROWSER_VIEW
Command failed: BROWSER_VIEW is not a valid action.

Maybe I'm missing something, but I see no harm to permitting BROWSER_VIEW regardless of the state of repository_dir. It would —

  • Make scripting a little easier for admins
  • Remove a mysterious constraint
  • Resolve the inconsistency in the default permissions for anonymous

Thanks

Attachments (0)

Change History (3)

comment:1 by Christian Boos, 14 years ago

Description: modified (diff)
Keywords: verify added
Milestone: 0.12

Need to check again what we do now in 0.12 (esp. in MultiRepos).

comment:2 by Remy Blank, 14 years ago

Keywords: verify removed
Milestone: 0.120.12-multirepos
Resolution: fixed
Status: newclosed

This is fixed already in MultiRepos, where the trac.versioncontrol.* components are not disabled anymore when repository_dir is empty. Actually, repository_dir now always starts empty, as we don't ask for a repository anymore during trac-admin $ENV initenv (repositories are added through the repository admin panel).

comment:3 by Remy Blank, 14 years ago

Owner: set to Remy Blank

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.