| 1 | = UserManagerPlugin = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | Yet another user manager plugin that has the following features: |
| 6 | - helps managing users(profiles, permissions, authentication[based on acct_mngr], and any other things based on this plugin's extension points ) |
| 7 | - provides filterable team rosters based on user profiles(+ custom fields) |
| 8 | |
| 9 | 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. |
| 10 | |
| 11 | |
| 12 | Note: This plugin is the next ''step'' of TeamRosterPlugin. So, in order to use UserManagerPlugin, please disable TeamRosterPlugin, in case you have it enabled. |
| 13 | UserManagerPlugin is compatable ~90% with data managed by TeamRosterPlugin, so switching from TeamRosterPlugin to UserManagerPlugin it's safe(no data loss). |
| 14 | |
| 15 | == Bugs/Feature Requests == |
| 16 | |
| 17 | Existing bugs and feature requests for UserManagerPlugin are |
| 18 | [report:9?COMPONENT=UserManagerPlugin here]. |
| 19 | |
| 20 | If you have any issues, create a |
| 21 | [http://trac-hacks.org/newticket?component=UserManagerPlugin&owner=cbalan new ticket]. |
| 22 | |
| 23 | == Download == |
| 24 | |
| 25 | Download the zipped source from [download:usermanagerplugin here]. |
| 26 | |
| 27 | == Source == |
| 28 | |
| 29 | You can check out UserManagerPlugin from [http://trac-hacks.org/svn/usermanagerplugin here] using Subversion, or [source:usermanagerplugin browse the source] with Trac. |
| 30 | |
| 31 | == Example == |
| 32 | |
| 33 | from tracusermanager.api import UserManager, User |
| 34 | |
| 35 | # Get user by id(username) |
| 36 | user = UserManager(env).get_user( "cbalan" ) |
| 37 | |
| 38 | # Get active users |
| 39 | team = UserManager(env).get_active_users() |
| 40 | |
| 41 | # Search users ( Dummy example: All active developers that have an gmail account ) |
| 42 | search_result_list = UserManager(env).search_users(User( role="developer", email="%gmail.com")) |
| 43 | |
| 44 | # Create new user |
| 45 | UserManager(self.env).create_user(User(username='cbalan', name="Catalin Balan", email='cbalan@optaros.com')) |
| 46 | |
| 47 | # Update |
| 48 | user = UserManager(self.env).get_user('cbalan') |
| 49 | user['bio']="""Maecenas ut mauris. Morbi congue nunc ut tortor. Pellentesque molestie cursus enim. |
| 50 | Praesent gravida consequat mauris. Nulla cursus cursus magna. |
| 51 | Sed libero. Integer dapibus urna in mauris. |
| 52 | |
| 53 | Fusce fringilla: |
| 54 | - Mauris ipsum mauris, semper at, lacinia ultrices, pellentesque eget, arcu. |
| 55 | - Etiam vel enim et nunc luctus gravida. Morbi suscipit scelerisque odio. |
| 56 | - Mauris porta. |
| 57 | |
| 58 | Nullam dui. Nullam egestas, massa eu condimentum mattis, enim ipsum tincidunt purus, |
| 59 | vitae vestibulum sapien eros vitae libero. |
| 60 | """ |
| 61 | user.save() |
| 62 | |
| 63 | # Remove |
| 64 | UserManager(env).remove_user(user) |
| 65 | |
| 66 | |
| 67 | == Recent Changes == |
| 68 | |
| 69 | [[ChangeLog(usermanagerplugin, 3)]] |
| 70 | |
| 71 | == Author/Contributors == |
| 72 | |
| 73 | '''Author:''' [wiki:cbalan] [[BR]] |
| 74 | '''Contributors:''' |