equal
deleted
inserted
replaced
44 su_user = createUser(username,email,password,dob,gender) |
44 su_user = createUser(username,email,password,dob,gender) |
45 su_user.is_staff = True |
45 su_user.is_staff = True |
46 su_user.is_superuser = True |
46 su_user.is_superuser = True |
47 su_user.save() |
47 su_user.save() |
48 return su_user |
48 return su_user |
|
49 |
|
50 def changeRole(role, user): |
|
51 """ change the status of user to role. |
|
52 """ |
|
53 |
|
54 user_profile = user.get_profile() |
|
55 user_profile.rights = role |
|
56 user_profile.save() |