Skip to content

Commit

Permalink
[Fixes #12713] Add remove function in permissions registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Jan 16, 2025
1 parent a9ffda0 commit ca1b250
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions geonode/security/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def add(self, module_path):
self.__check_item(item)
self.REGISTRY.append(item)

def remove(self, module_path):
item = import_string(module_path)()
self.__check_item(item)
self.REGISTRY.remove(item)

Check warning on line 40 in geonode/security/registry.py

View check run for this annotation

Codecov / codecov/patch

geonode/security/registry.py#L38-L40

Added lines #L38 - L40 were not covered by tests

def reset(self):
self.REGISTRY = []

Expand Down

0 comments on commit ca1b250

Please sign in to comment.