diff --git a/koordinates/api/enums.py b/koordinates/api/enums.py index ca582b2..8391834 100644 --- a/koordinates/api/enums.py +++ b/koordinates/api/enums.py @@ -40,6 +40,7 @@ class UserDatasetCapability(Enum): """ Star = 0 Clone = 1 + RequestClone = 2 class DataType(Enum): diff --git a/koordinates/api/repo.py b/koordinates/api/repo.py index ee53ea4..33183fb 100644 --- a/koordinates/api/repo.py +++ b/koordinates/api/repo.py @@ -30,7 +30,8 @@ def user_capabilities(self) -> Set[UserDatasetCapability]: for capability_string, capability_flag in { 'can-star': UserDatasetCapability.Star, - 'can-clone': UserDatasetCapability.Clone + 'can-clone': UserDatasetCapability.Clone, + 'can-request-clone': UserDatasetCapability.RequestClone }.items(): if capability_string in self.definition.get( 'user_capabilities', [] diff --git a/koordinates/gui/dataset_browser_items.py b/koordinates/gui/dataset_browser_items.py index 052dc43..a861c80 100644 --- a/koordinates/gui/dataset_browser_items.py +++ b/koordinates/gui/dataset_browser_items.py @@ -549,7 +549,8 @@ def __init__(self, """ self.setStyleSheet(base_style) - if Capability.Clone in self.dataset.capabilities: + if (Capability.Clone in self.dataset.capabilities + or Capability.RequestClone in self.dataset.capabilities): self.btnClone = CloneButton(self.dataset) buttons_layout.addWidget(self.btnClone) else: diff --git a/koordinates/gui/dataset_dialog.py b/koordinates/gui/dataset_dialog.py index 794f5c0..40746f6 100644 --- a/koordinates/gui/dataset_dialog.py +++ b/koordinates/gui/dataset_dialog.py @@ -128,7 +128,8 @@ def __init__(self, parent, dataset: Dataset): self.star_button = StarButton(self.dataset) title_hl.addWidget(self.star_button) - if Capability.Clone in self.dataset.capabilities: + if (Capability.Clone in self.dataset.capabilities + or Capability.RequestClone in self.dataset.capabilities): self.clone_button = CloneButton(self.dataset, close_parent_on_clone=True) title_hl.addWidget(self.clone_button)