Changes between Initial Version and Version 1 of Ticket #11272
- Timestamp:
- Aug 7, 2013, 9:08:12 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11272 – Description
initial v1 1 We can improve error handling and reporting for 3 common scenarios that are seen when using the [browser:/tags/trac-1.0.1/tracopt/perm/authz_policy.py AuthzPolicy].1 We can improve error handling and reporting for 3 scenarios that may be seen when using the [browser:/tags/trac-1.0.1/tracopt/perm/authz_policy.py AuthzPolicy]. 2 2 3 3 1. When an authz file has duplicated sections, Trac generates an internal error with a traceback: … … 27 27 First error at line 4. 28 28 }}} 29 Though the duplicate sections error is easy to reproduce, the proposed change should trap and present a user-friendly error message when any exception is thrown while `ConfigObj` is parsing the file (by trapping all [http://www.voidspace.org.uk/python/configobj.html#exceptions ConfigObjError]s). 29 30 1. When the authz file is not found, Trac generates an internal error with a traceback: 30 31 {{{ … … 52 53 OSError: [Errno 2] No such file or directory: '/home/user/Workspace/t11260/tracdev/conf/authzpolicy?.conf' 53 54 }}} 54 1. If there is an error in the permission policy, for example: `permission_policies = AuthzPermissionPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy` (should be AuthzPolicy), no error is reported. There should at least be a warning in the logs. 55 1. If there is an error in the configuration of permission policies, for example: `permission_policies = AuthzPermissionPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy` (the first entry should be `AuthzPolicy`), no error is reported. There should at least be a warning in the logs. 56 57 While [browser:/tags/trac-1.0.1/trac/config.py@:693-697#L679 ExtensionOption] throw an exception when the specified implementation of the interface can't be found, [browser:/tags/trac-1.0.1/trac/config.py@:719-721,730-731#L700 OrderedExtensionOption] does not. Changing the behavior of `OrderedExtensionOption` will have to be carefully considered.