[28902] in Source-Commits

home help back first fref pref prev next nref lref last post

python-discuss commit: Convenience function to append to a user's ACL

daemon@ATHENA.MIT.EDU (Alex Dehnert)
Fri Feb 21 23:14:57 2025

Date: Fri, 21 Feb 2025 23:13:33 -0500
From: "Alex Dehnert" <adehnert@mit.edu>
Message-Id: <202502220413.51M4DXXS027676@drugstore.mit.edu>
To: source-commits@mit.edu
MIME-Version: 1.0
Content-Type: text/plain

https://github.com/mit-athena/python-discuss/commit/44e1473ee2412b7291c86f83b6f246dd97b4c4ec
commit 44e1473ee2412b7291c86f83b6f246dd97b4c4ec
Author: Alex Dehnert <adehnert@mit.edu>
Date:   Wed Feb 26 03:47:32 2014 -0500

    Convenience function to append to a user's ACL

 discuss/client.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/discuss/client.py b/discuss/client.py
index 2894de0..54ea390 100644
--- a/discuss/client.py
+++ b/discuss/client.py
@@ -309,6 +309,10 @@ class Meeting(object):
         if result != 0:
             raise DiscussError(result)
 
+    def ensure_access(self, principal, modes):
+        current = self.get_access(principal)
+        self.set_access(principal, current+modes)
+
     @autoreconnects
     def undelete_transaction(self, trn_number):
         """Undelete the transaction by its number."""

home help back first fref pref prev next nref lref last post