From 1f221b87bb5a649f6eac605dae920bb4431c158d Mon Sep 17 00:00:00 2001
From: Florian Spreckelsen <f.spreckelsen@indiscale.com>
Date: Mon, 29 Apr 2024 15:41:31 +0200
Subject: [PATCH] ENH: Allow kwargs for Entity.update in Entity.update_acl

---
 src/linkahead/common/models.py | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py
index ba42b972..748fbb95 100644
--- a/src/linkahead/common/models.py
+++ b/src/linkahead/common/models.py
@@ -1450,7 +1450,26 @@ out: List[Entity]
         self.acl = Entity(name=self.name, id=self.id).retrieve(
             flags={"ACL": None}).acl
 
-    def update_acl(self):
+    def update_acl(self, **kwargs):
+        """Update this entities ACL on the server.
+
+        Note
+        ----
+        This overwrites any existing ACL, so you may want to run
+        ``retrieve_acl`` before updating the ACL in this entity.
+
+        Parameters
+        ----------
+        **kwargs : dict
+            Keyword arguments that are being passed through to the
+            ``Entity.update`` method.
+
+        Returns
+        -------
+        e : Entity
+            This entity after the update of the ACL.
+
+        """
         if self.id is None:
             c = Container().retrieve(query=self.name, sync=False)
 
@@ -1473,7 +1492,7 @@ out: List[Entity]
         if self.acl is None:
             raise EntityHasNoAclError("This entity does not have an ACL yet. Please set one first.")
         e.acl = ACL(self.acl.to_xml())
-        e.update()
+        e.update(**kwargs)
 
         return e
 
-- 
GitLab