Skip to content

Commit

Permalink
remove is_allowed_to_use_labels from rfps
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed May 15, 2024
1 parent 90e5616 commit 67ec21a
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,6 @@ impl Contract {
"Cannot create proposal which is not in a Accepting Submissions state"
);

require!(
self.is_allowed_to_use_labels(
Some(editor_id.clone()),
labels.iter().cloned().collect()
),
"Cannot use these labels"
);

for label in &labels {
require!(
self.global_labels_info.get(label).is_some(),
Expand Down Expand Up @@ -1026,21 +1018,6 @@ impl Contract {

let labels_to_remove = &old_labels_set - &new_labels_set;
let labels_to_add: HashSet<String> = &new_labels_set - &old_labels_set;
require!(
self.is_allowed_to_use_labels(
Some(editor_id.clone()),
labels_to_remove.iter().cloned().collect()
),
"Not allowed to remove these labels"
);
require!(
self.is_allowed_to_use_labels(
Some(editor_id.clone()),
labels_to_add.iter().cloned().collect()
),
"Not allowed to add these labels"
);

for label_to_remove in labels_to_remove {
let mut rfps = self.label_to_rfps.get(&label_to_remove).unwrap();
rfps.remove(&id);
Expand Down

0 comments on commit 67ec21a

Please sign in to comment.