Skip to content

Commit e0c9552

Browse files
committed
fix
1 parent 6ab8709 commit e0c9552

File tree

1 file changed

+4
-2
lines changed
  • rust/signed_doc/src/validator/rules/ownership

1 file changed

+4
-2
lines changed

rust/signed_doc/src/validator/rules/ownership/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ impl DocumentOwnershipRule {
153153

154154
let doc_authors = doc.authors().into_iter().collect::<HashSet<_>>();
155155

156-
// all elements of the `doc_authors` should be intersecting with the `allowed_authors`
157-
let is_valid = allowed_authors.intersection(&doc_authors).count() == doc_authors.len();
156+
// all elements of the `doc_authors` should be intersecting with the `allowed_authors` OR
157+
// `allowed_authors` must be empty
158+
let is_valid = allowed_authors.is_empty()
159+
|| allowed_authors.intersection(&doc_authors).count() == doc_authors.len();
158160

159161
if !is_valid {
160162
doc.report().functional_validation(

0 commit comments

Comments
 (0)