Modify

Opened 9 years ago

Closed 8 years ago

Last modified 2 years ago

#264 closed enhancement (wontfix)

patch for tickets 180 and 155

Reported by: truijllo@… Owned by: mgood
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: gunnar Trac Release: 0.8

Description (last modified by athomas)

Hi ! I attach here my files modified with patches for tickets #180 and #155.

#180 - only file htfile.py, new methods for various check and patch for _update_file method. Check inside for group names banned ( check group names in db and exclude them ) in trac.ini ( for environment ) must add

password_format = htpasswd
password_file = /path/to/htpasswd
default-group = authenticated

#155 - web_ui, new check and error message for banned group names in example if you define authenticated, dev, other groups ... banned usernames will be authenticated, dev, other, WIKI_VIEW, etc etc etc ( default actions too will be protected ). api.py, new method interface

user added with these files will be created with a default permission specified in

trac.ini ==> [account-manager] ==> default-group

Attachments (6)

api.py (4.1 KB) - added by anonymous 9 years ago.
api.py
htfile.py (6.3 KB) - added by anonymous 9 years ago.
htfile.py
web_ui.py (7.1 KB) - added by anonymous 9 years ago.
web_ui.py
api.py.diff (261 bytes) - added by anonymous 9 years ago.
htfile.py.diff (2.7 KB) - added by anonymous 9 years ago.
web_ui.py.diff (216 bytes) - added by anonymous 9 years ago.

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by anonymous

api.py

Changed 9 years ago by anonymous

htfile.py

Changed 9 years ago by anonymous

web_ui.py

comment:1 Changed 9 years ago by athomas

  • Description modified (diff)

comment:2 Changed 9 years ago by mgood

Please attach diffs, not whole files. You can create a diff from a modified SVN checkout:

svn diff > mypatch.diff

This makes it much easier for developers to see what changes you've made and it's easy to apply the changes with one command:

patch -p0 < mypatch.diff

Changed 9 years ago by anonymous

Changed 9 years ago by anonymous

Changed 9 years ago by anonymous

comment:3 Changed 9 years ago by truijllo@…

Done

comment:4 in reply to: ↑ description Changed 8 years ago by Gunnar Wagenknecht <gunnar@…>

  • Cc gunnar@… added; anonymous removed
  • Trac Release set to 0.8

Replying to 264:

password_format = htpasswd
password_file = /path/to/htpasswd
default-group = authenticated

It's rather religious but the naming convention should be followed, i.e. default_group instead of default-group. This prevents people from mixing it up later.

But it interesting to have this feature. I was just about to open en enhancement request for this. :)

comment:5 Changed 8 years ago by gunnar

  • Cc gunnar added; gunnar@… removed

comment:6 Changed 8 years ago by mgood

  • Resolution set to wontfix
  • Status changed from new to closed

Please, when attaching patches use the output of the "svn diff" command as I asked for above. That way you can attach a single patch file containing all the changes, rather than one diff per-file.

I've just fixed #155, and the changes for #180 already listed on that ticket are pretty simple. The "default-group" setting is not necessary since all registered users are already members of the "authenticated" group. In the future it's also easier if you provide separate patches for each issue rather than combining them, unless the changes are dependent on each other.

comment:7 Changed 2 years ago by rjollos

  • Keywords 180 155 removed

Add Comment

Modify Ticket

Action
as closed The owner will remain mgood.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.