Modify

Opened 14 years ago

Closed 12 years ago

#7324 closed enhancement (fixed)

Add support for autocomplete users on admin permissions page

Reported by: Chris Heller Owned by: Ryan J Ollos
Priority: normal Component: AutocompleteUsersPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

We have added support for doing autocompletion of the subject on the Trac admin permissions page.

Autocompleting the "Add Subject to Group" is relatively straightforward.

Autocompleting the "Grant Permission" is a little bit trickier because you may also be granting permissions to groups. For that, we added general support to optionally specify that the returned list should include groups and pass that along in the request for subjects when granting permissions.

The PermissionSystem component does not have direct support for just getting the list of groups, so SQL is done against the permission table to dig out the list, which is then also filtered by the search criteria. Any matching groups are then added to the end of the user list (as opposed to sorting them into the user list itself).

Attachments (2)

autocomplete_perms.js (216 bytes) - added by Chris Heller 14 years ago.
JavaScript for autocompletion on admin permission page
autocomplete_perms.patch (3.1 KB) - added by Chris Heller 14 years ago.
Modifications to autocompleteusers.py for autocompleting admin perms

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by Chris Heller

Attachment: autocomplete_perms.js added

JavaScript for autocompletion on admin permission page

Changed 14 years ago by Chris Heller

Attachment: autocomplete_perms.patch added

Modifications to autocompleteusers.py for autocompleting admin perms

comment:1 Changed 14 years ago by Ryan J Ollos

Owner: changed from Jeff Hammel to Ryan J Ollos

Changing ticket owner to be new maintainer.

comment:2 Changed 12 years ago by Ryan J Ollos

This has been implemented in mitar's branch a91a35e5f6f7 and will be pulled in shortly.

comment:3 Changed 12 years ago by Ryan J Ollos

#4832 closed as a duplicate.

comment:4 Changed 12 years ago by Ryan J Ollos

#4832 also requests autocomplete support for the Components admin panel (and provides a patch) and for the SvnAuthzAdminPlugin. For the latter, we should add generalized support for adding autocomplete to fields, specified through trac.ini options.

comment:5 Changed 12 years ago by Ryan J Ollos

Status: newassigned

There are a couple of potential issues with this patch:

  • It assumes groups starts with an '@' character.
  • The sg_group field is not autocompleted.

comment:6 Changed 12 years ago by Ryan J Ollos

(In [11730]) Refs #7324: Added support for autocompleting users and groups on the admin permissions page. Thanks to chrisheller for the initial patch.

comment:7 Changed 12 years ago by Ryan J Ollos

Code review and other feedback are welcome and appreciated. My development plan is:

  • #6427 + #6444 + #7324 + #8477 (and possibly #4442) -> 0.4.2 (Trac 0.11+)
  • #8438 + #9599 (and possibly #7605) -> 0.5 (Trac 0.12+)
  • Make compatible with Trac 1.0 by using jQuery UI that ships with Trac, assuming that it has Autocomplete support bundled in. This would be similar to the work I'm doing for the DateFieldPlugin in #10107.

comment:8 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Fix is in the current dev version of the trunk and will be released with version 0.4.2 of the plugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.