id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 11529,[authz_policy] authz_file should be defined using PathOption,Ryan J Ollos,Ryan J Ollos,"The example in the documentation for !AuthzPolicy shows: {{{#!ini [authz_policy] authz_file = conf/authzpolicy.conf }}} and `authz_file` is defined: {{{#!python authz_file = Option('authz_policy', 'authz_file', '', 'Location of authz policy configuration file.') }}} A relative path for `authz_file` is resolved relative to the environment directory: [browser:/branches/1.0-stable/tracopt/perm/authz_policy.py@12054:175-17#L166]. On the other hand, `PathOption` resolves relative paths as relative to the directory of the //trac.ini// configuration file. It is probably reasonable to expect that `authz_file` would be relative to the `$env/conf` directory since it is a configuration file. This would also make the behavior consistent with `[trac] authz_file`, which uses `PathOption`. {{{#!sh $ grep -r ""PathOption("" teo-rjollos.git/ --exclude-dir=.svn --exclude=config.py --exclude=*.pyc teo-rjollos.git/tracopt/versioncontrol/git/git_fs.py: projects_list = PathOption('git', 'projects_list', doc= teo-rjollos.git/tracopt/versioncontrol/git/git_fs.py: projects_base = PathOption('git', 'projects_base', doc= teo-rjollos.git/trac/env.py: shared_plugins_dir = PathOption('inherit', 'plugins_dir', '', teo-rjollos.git/trac/web/chrome.py: shared_templates_dir = PathOption('inherit', 'templates_dir', '', teo-rjollos.git/trac/web/chrome.py: shared_htdocs_dir = PathOption('inherit', 'htdocs_dir', '', teo-rjollos.git/trac/versioncontrol/svn_authz.py: authz_file = PathOption('trac', 'authz_file', '', }}} If the change is made, an environment upgrade step will be required to modify the value of `authz_file` in //trac.ini//: * Strip `conf/` when path begins with `conf/`. * Transform other relative paths to absolute paths or prefix with `..`. ",enhancement,closed,normal,1.1.4,general,1.0-stable,normal,fixed,authzpolicy,,,"Relative paths for the `[authz_policy]` `authz_file` option are resolved relative to the Environment's `conf` directory, rather than relative to the Environment directory.",,