Skip to content

Commit

Permalink
added validation rule that creator of developer collective cannot cre…
Browse files Browse the repository at this point in the history
…ate permission for themselves
  • Loading branch information
matthme committed Apr 23, 2024
1 parent a6eb5bc commit f586be1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ pub fn validate_create_contributor_permission(
),
);
}
if record.action().author() == &contributor_permission.for_agent {
return Ok(
ValidateCallbackResult::Invalid(
"The creator has already full owner permissions and cannot issue a contributor permission for themselves."
.into(),
),
);
}
let _developer_collective: crate::DeveloperCollective = record
.entry()
.to_app_option()
Expand Down

0 comments on commit f586be1

Please sign in to comment.