[PATCH] Add EDIT_FILES permission, new options (ini-admin enabled), preserve list order
|Reported by:||dnedelchev||Owned by:||mvr|
New and improved features after applying this patch:
- Added: EDIT_FILES permission
- Added: trac.ini new options (list vew: replace rules; show/hide paths)
- Modified: EditFile: info header
- Fixed: file list order preserved as it is in [edit_file] section in trac.ini
- Fixed: Leading/trailing white space now is preserved at file save (with an exception - see below)
Known issues in  of the plugin not fixed by this patch:
- Bug: A wrong file can be overwritten if files list in the [edit_files] section of trac.ini is modified while a file is being edited. Workaround: ensure trac.ini is not modified at the same time.
- ToDo: Files can't be marked as read-only. Workaround: set to read-only at file-system level.
- ToDo: Creating a backup of the file before saving. It should be an option though.
- Bug: (However that's bug maybe is not in the plugin itself) If the edited file starts with a new-line, its stripped (apparently when file is read, not when written). Workaround: do not start the file with an empty line - if a space is inserted in the top of the file, the subsequent new-line is not stripped (and the line still looks like if its empty).
I intended to use this plugin to edit the trac.ini files of all projects from a single place.
When I configured the plugin in my main trac environment I got an randomly ordered list with a lot of .. trac.ini items. That proved to be quite useless for me so I decided to try fixing it...
So I did.
The final result exceeded my expectation. I was vastly amazed how easy it was for an absolute python newbie like me (say "Hello World +" level) to implement it!
Change History (13)
comment:2 Changed 4 years ago by dnedelchev
- Priority changed from normal to high
- Type changed from defect to enhancement