[28900] in Source-Commits
python-discuss commit: Add an API function for removing access too
daemon@ATHENA.MIT.EDU (Alex Dehnert)
Fri Feb 21 23:13:57 2025
Date: Fri, 21 Feb 2025 23:13:33 -0500
From: "Alex Dehnert" <adehnert@mit.edu>
Message-Id: <202502220413.51M4DXTo027708@drugstore.mit.edu>
To: source-commits@mit.edu
MIME-Version: 1.0
Content-Type: text/plain
https://github.com/mit-athena/python-discuss/commit/337baa9848153ebc38f5afe2c96825482de031cb
commit 337baa9848153ebc38f5afe2c96825482de031cb
Author: Alex Dehnert <adehnert@mit.edu>
Date: Sat Mar 8 18:10:05 2014 -0500
Add an API function for removing access too
discuss/client.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/discuss/client.py b/discuss/client.py
index 8106962..5e96367 100644
--- a/discuss/client.py
+++ b/discuss/client.py
@@ -315,6 +315,11 @@ class Meeting(object):
current = self.get_access(principal)
self.set_access(principal, current+modes)
+ def remove_access(self, principal, modes):
+ current = self.get_access(principal)
+ new_modes = ''.join(c for c in current if not c in modes)
+ self.set_access(principal, new_modes)
+
@autoreconnects
def undelete_transaction(self, trn_number):
"""Undelete the transaction by its number."""