Opened 15 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)
Change History (10)
Changed 15 years ago by
Attachment: | autocomplete_perms.js added |
---|
Changed 15 years ago by
Attachment: | autocomplete_perms.patch added |
---|
Modifications to autocompleteusers.py for autocompleting admin perms
comment:1 Changed 14 years ago by
Owner: | changed from Jeff Hammel to Ryan J Ollos |
---|
Changing ticket owner to be new maintainer.
comment:2 Changed 12 years ago by
This has been implemented in mitar's branch a91a35e5f6f7 and will be pulled in shortly.
comment:4 Changed 12 years ago by
#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
Status: | new → assigned |
---|
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
(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
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
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix is in the current dev version of the trunk and will be released with version 0.4.2 of the plugin.
JavaScript for autocompletion on admin permission page