= UserManagerPlugin = == Description == Yet another user manager plugin that has the following features: - helps managing users(profiles, permissions, authentication[based on acct_mngr], 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 to 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 it's safe(no data loss). == Bugs/Feature Requests == Existing bugs and feature requests for UserManagerPlugin are [report:9?COMPONENT=UserManagerPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=UserManagerPlugin&owner=cbalan new ticket]. == Download and Source == Download the [download:usermanagerplugin zipped source], check out from the [http://trac-hacks.org/svn/usermanagerplugin subversion repository], or [source:usermanagerplugin browse the source] with Trac. == Example == === 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 }}} === 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).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 }}} == Screenshoots == [[Image(screenshot2.png, width=400px)]][[Image(screenshot3.png, width=400px)]][[BR]] [[Image(screenshot4.png, width=400px)]][[Image(screenshot5.png, width=400px)]][[BR]] [[Image(screenshot6.png, width=400px)]][[Image(screenshot7.png, width=400px)]][[BR]] == Recent Changes == [[ChangeLog(usermanagerplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:cbalan] [[BR]] '''Contributors:'''