[[PageOutline(2-5,Contents,pullout)]] = Manage users and teams {{{#!box info '''Notice''': there are plans to integrate the functionality of this plugin into AccountManagerPlugin. }}} == Description This plugin provides a simple, standard way for teams to manage the resources on the team from within Trac. While trac.admin provides too many places to set up one user, this plugin provides one single page where a project admin can setup ''all'' things related to one user. Key features: * Helps managing users, such as profiles, permissions, authentication (based on AccountManagerPlugin), and anything based on this plugin's extension points. * Provides filterable team rosters based on user profiles and custom fields. * There is also an [#API API] available to allow you to develop your own user views. Screenshot of a user: [[Image(screenshot-user.png, border=2)]] See below for more screenshots. To use as a 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 }}} See also: UserPicturesPlugin == Bugs/Feature Requests Existing bugs and feature requests for UserManagerPlugin are [report:9?COMPONENT=UserManagerPlugin here]. If you have any issues, create a [/newticket?component=UserManagerPlugin new ticket]. [[TicketQuery(component=UserManagerPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:usermanagerplugin here]. == Source You can check out UserManagerPlugin from [/svn/usermanagerplugin here] using Subversion, or [source:usermanagerplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. Install the plugin, for example for Trac 0.11: `easy_install https://trac-hacks.org/svn/usermanagerplugin/0.11` == Configuration Add the following lines to your `trac.ini` file: {{{#!ini [components] 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: {{{#!ini [components] acct_mgr.admin.accountmanageradminpanel = disabled # AccountManager < 0.5 acct_mgr.admin.useradminpanel = disabled # AccountManager >= 0.5 }}} == API {{{#!python 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).delete_user(user) }}} == Screenshots '''Admin user interface''': [[Image(screenshot2.png, 80%)]] '''User permissions setup:''' [[Image(screenshot3.png, 80%)]] '''User authentication:''' [[Image(screenshot4.png, 80%)]] '''Manage user profiles fields:''' [[Image(screenshot5.png, 80%)]] '''Team profile with the users defined on it:''' [[Image(screenshot6.png, 80%)]] '''User management administration:''' [[Image(screenshot7.png, 80%)]] == 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 out of date. == Recent Changes [[ChangeLog(usermanagerplugin, 3)]] == Author/Contributors '''Author:''' [wiki:cbalan] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' hasienda