equal
deleted
inserted
replaced
88 with entity._cw.security_enabled(read=False): |
88 with entity._cw.security_enabled(read=False): |
89 entity.complete(tuple(attrs)) |
89 entity.complete(tuple(attrs)) |
90 if entity.__regid__ == 'CWUser': |
90 if entity.__regid__ == 'CWUser': |
91 wf = entity.cw_adapt_to('IWorkflowable') |
91 wf = entity.cw_adapt_to('IWorkflowable') |
92 if wf.state == 'deactivated': |
92 if wf.state == 'deactivated': |
93 self.warning('update on deactivated user %s', entity.login) |
93 wf.fire_transition('activate') |
|
94 self.warning('user %s reactivated', entity.login) |
94 mdate = attrs.get('modification_date') |
95 mdate = attrs.get('modification_date') |
95 if not mdate or mdate > entity.modification_date: |
96 if not mdate or mdate > entity.modification_date: |
96 attrs = dict( (k, v) for k, v in attrs.iteritems() |
97 attrs = dict( (k, v) for k, v in attrs.iteritems() |
97 if v != getattr(entity, k)) |
98 if v != getattr(entity, k)) |
98 if attrs: |
99 if attrs: |