node: check policy before visibility
In the is_authorized helper, the logic checks the policy and the visibility of
the repository.
If the policy is set to block, the function can return before getting the repository and the identity document. This improves the check, since the repository and identity document may be missing if the repository is blocked, so it would return a different error other than the expected unauthorized error.
1 file changed
+6
-1
1d57778f
→
f244d89e
modified radicle-node/src/worker.rs
@@ -280,9 +280,14 @@ impl Worker {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|