Contents
Manage users and teams
Description
Yet another user manager plugin that has the following features:
- helps managing users (profiles, permissions, authentication (based on AccountManagerPlugin), and any other things based on this plugin's extension points)
- provides filterable team rosters based on user profiles (+ custom fields)
The main goal of this plugin is to to have a simple, standard way for teams to manage who is on the team. Since trac.admin provides too many places to setup one user, this plugin tries to provide one single page where a project admin can setup all things related to one user.
Note: This plugin is the next step of TeamRosterPlugin. So, in order to use UserManagerPlugin, please disable TeamRosterPlugin, in case you have it enabled. UserManagerPlugin is compatible ~90% with data managed by TeamRosterPlugin, so switching from TeamRosterPlugin to UserManagerPlugin is safe (no data loss).
Bugs/Feature Requests
Check existing bugs and feature requests, but feel also free to create a new ticket.
Download and Source
Download the zipped source, check out from the subversion repository, or browse the source with Trac.
Install
Install the plugin:
- For Trac 0.11
- easy_install http://trac-hacks.org/svn/usermanagerplugin/0.11
Config
[componets] tracusermanager.* = enabled [um_profile-custom] office = select office.cols = 20 office.label = Office office.options = |Bucharest|Boston|San Francisco|New York office.order = 1 bio = wikitext bio.cols = 70 bio.rows = 10 bio.label = Bio bio.order = 2 gim = text gim.cols = 20 gim.label = Gmail gim.order = 3 yim = text yim.cols = 20 yim.label = Yahoo yim.order = 4 tags = multichecks tags.label = Tags tags.options = developer|qa|pm|ux tags.order = 5
Note: If you also have AccountManagerPlugin installed, you may want to disable its admin interface so you don't have two 'Users' entries in the Admin Accounts section.
[components] acct_mgr.admin.accountmanageradminpage = disabled
API
from tracusermanager.api import UserManager, User # Get user by id(username) user = UserManager(env).get_user( "cbalan" ) # Get active users team = UserManager(env).get_active_users() for user in team: print user.username print user['email'] print user['bio'] # Search users ( Dummy example: All active developers that have an gmail account ) search_result_list = UserManager(env).search_users(User( role="developer", email="%gmail.com")) for user in search_result_list: print user.username print user['role'] # Create new user UserManager(self.env).create_user(User(username="cbalan", name="Catalin Balan", email="cbalan@optaros.com")) # Update user = UserManager(self.env).get_user('cbalan') user['bio']="""Maecenas ut mauris. Morbi congue nunc ut tortor. Pellentesque molestie cursus enim. Praesent gravida consequat mauris. Nulla cursus cursus magna. Sed libero. Integer dapibus urna in mauris. Fusce fringilla: - Mauris ipsum mauris, semper at, lacinia ultrices, pellentesque eget, arcu. - Etiam vel enim et nunc luctus gravida. Morbi suscipit scelerisque odio. - Mauris porta. Nullam dui. Nullam egestas, massa eu condimentum mattis, enim ipsum tincidunt purus, vitae vestibulum sapien eros vitae libero. """ user.save() # Remove UserManager(env).remove_user(user)
Macro
[[UserProfilesList]] # Without arguments returns current active user profiles [[UserProfilesList(role=developer)]] # Returns all userProfiles with role='developer' [[UserProfilesList(NOT_role=developer)]] # Returns all userProfiles with NOT role=developer [[UserProfilesList(name=%someName%)]] # Returns all userProfiles with name like 'someName' [[UserProfilesList({id=cbalan},{role=%arh%})]] # Returns cbalan's profile and user profiles with role='%arh%' [[UserProfilesList(|class=someCSS_Class, style=border:1px solid green;padding:12px)]] # Adds style and class attributes to box layout
Screenshots
Questions
- Could you explain the interface?
- What's the difference between 'Users' and 'External Users'?
- Some of the screen shots seem like they might be a little out of date.
Recent Changes
[12293] by rjollos on 11/03/12 22:04:18
Refs #10586: Part of [12286]. Removed unused variable.
[12286] by rjollos on 11/02/12 22:14:05
Refs #10586:
- Columns can be sorted on the Users page.
- Changes are Python 2.4 compatible by choosing and/or clauses in favor of if/else, but code can be refactored and made cleaner in a future revision when the 2.4 compatibility is dropped.
- The implementation of the query module (primarily query.html, query_results.html, query.py) was used as a guide.
- Bumped version to 0.5dev.
- Added a changelog.
[12152] by hasienda on 10/11/12 21:27:29
UserManagerPlugin: Correct [4262] to get picture upload finally working, closes #3695.
This patch has been kindly provided by uray more than one year ago. Because I promised cbalan to assist a bit, this is the least I can do. Sorry for taking so much time.
[12113] by rjollos on 10/04/12 21:21:30
Fixes #9553: Chrome constructor was not being passed the required Environment object, resulting in an error when using the UserProfileList macro. Thanks to ejucovy for the patch. Tested with Trac 1.1.1dev-r11384.
Added setup.cfg so that SVN revision will be appended to the egg.
Author/Contributors
Attachments
- screenshot2.png (207.5 kB) -
admin.profile
, added by cbalan on 01/29/08 15:36:06. - screenshot3.png (179.3 kB) -
admin.permissions
, added by cbalan on 01/29/08 15:36:28. - screenshot4.png (163.3 kB) -
admin.autentication
, added by cbalan on 01/29/08 15:36:53. - screenshot5.png (170.4 kB) -
admin.profile.customfields
, added by cbalan on 01/29/08 15:37:18. - screenshot6.png (220.9 kB) -
userprofileslist macro
, added by cbalan on 01/29/08 15:37:52. - screenshot7.png (201.4 kB) -
admin
, added by cbalan on 01/29/08 15:38:19.