equal
deleted
inserted
replaced
132 |
132 |
133 When the account is changed, the former_accounts field should be appended |
133 When the account is changed, the former_accounts field should be appended |
134 with the old account. |
134 with the old account. |
135 Also, if either is_developer or agrees_to_tos change, the user's |
135 Also, if either is_developer or agrees_to_tos change, the user's |
136 rights have changed, so we need to flush the sidebar. |
136 rights have changed, so we need to flush the sidebar. |
|
137 Make sure once the user agreed ToS, the ToS fields can't be changed. |
137 """ |
138 """ |
|
139 |
|
140 # iff the agreed_to_tos is True and we want to set it to False |
|
141 if (name == 'agreed_to_tos') and (not value) and entity.agreed_to_tos: |
|
142 return False |
|
143 |
|
144 # iff the agreed_to_tos_on has a value and we want to change it |
|
145 if (name == 'agreed_to_tos_on') and entity.agreed_to_tos_on and ( |
|
146 value != entity.agreed_to_tos_on): |
|
147 return False |
138 |
148 |
139 if (name == 'is_developer') and (entity.is_developer != value): |
149 if (name == 'is_developer') and (entity.is_developer != value): |
140 sidebar.flush(entity.account) |
150 sidebar.flush(entity.account) |
141 |
151 |
142 if (name == 'agreed_to_tos') and (entity.agreed_to_tos != value): |
152 if (name == 'agreed_to_tos') and (entity.agreed_to_tos != value): |