You would need to do this at the application level on one of the nodes, creating a notification script (see the walletnotify runtime parameter) that detects the incoming transaction, then assigns the write permission in response. You can't currently configure the blockchain to make this connection automatically.