| 143 | self.notify = notify |
| 144 | |
| 145 | def main(self): |
| 146 | if self.mode == "NEW": |
| 147 | self.new() |
| 148 | |
| 149 | if log_has_error(self.log): |
| 150 | return |
| 151 | |
| 152 | # Could add "update" here in future... |
| 153 | if self.mode in ["REMOVE"]: |
| 154 | self.verify_member_list_untrusted() |
| 155 | |
| 156 | for member in self.member_list: |
| 157 | |
| 158 | self.member_to_modify = member |
| 159 | |
| 160 | if self.mode == "REMOVE": |
| 161 | self.remove() |
| 162 | |
| 163 | if log_has_error(self.log): |
| 164 | return |
| 165 | |
| 166 | if len(self.log["error"].keys()) == 0: |
| 167 | # cache invalidation if successful |
| 168 | self.project.set_cache_key_dirty('member_list') |
| 169 | self.session.add(self.project) |
| 170 | |
| 171 | def verify_member_list_untrusted(self): |
| 172 | |