| 1895 | |
| 1896 | |
| 1897 | class AcceptTransferCommand(Command): |
| 1898 | def get_parser(self): |
| 1899 | return check_enforcements_parser |
| 1900 | |
| 1901 | def is_authorised(self): |
| 1902 | return False |
| 1903 | |
| 1904 | def execute(self, params, **kwargs): |
| 1905 | share_account_by = params.get_share_account_timestamp() |
| 1906 | if share_account_by is not None: |
| 1907 | if api.accept_account_transfer_consent(params): |
| 1908 | if 'must_perform_account_share_by' in params.settings: |
| 1909 | del params.settings['must_perform_account_share_by'] |
| 1910 | if 'share_account_to' in params.settings: |
| 1911 | del params.settings['share_account_to'] |
| 1912 | logging.info('Account transfer accepted.') |
| 1913 | else: |
| 1914 | logging.info('Account transfer canceled.') |
| 1915 | else: |
| 1916 | logging.info('There is no account transfer to accept.') |
| 1917 | |
| 1918 | |
| 1919 | class LogoutCommand(Command): |
no outgoing calls
no test coverage detected