Created
October 12, 2019 15:27
-
-
Save tatat/fb2e2dd4dfc40017f4d403ca96c9e6c0 to your computer and use it in GitHub Desktop.
rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValid() { | |
return ( | |
isSpecifiedUser() || | |
( | |
request.resource.data.privateKey1 == resource.data.privateKey1 && | |
request.resource.data.privateKey2 == resource.data.privateKey2 && | |
'publicKey' in request.resource.data | |
) | |
) && ( | |
request.resource.data.keys().hasOnly(['privateKey1', 'privateKey2' 'publicKey']) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment