taskapp/events/user.py
changeset 107 4903b4973fc8
parent 31 988d4994578f
child 153 925af1b4ee65
--- a/taskapp/events/user.py	Fri Feb 26 00:29:04 2010 +0530
+++ b/taskapp/events/user.py	Fri Feb 26 01:13:14 2010 +0530
@@ -46,3 +46,11 @@
     su_user.is_superuser = True
     su_user.save()
     return su_user
+
+def changeRole(role, user):
+    """ change the status of user to role.
+    """
+
+    user_profile = user.get_profile()
+    user_profile.rights = role
+    user_profile.save()