diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-07-27 05:07:19 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-07-27 05:07:19 (GMT) |
commit | 7b9190b8fc416f97c17ca6461dd73967813516c7 (patch) | |
tree | 69c189a91c6dd0255faedba4392fc9a331f01736 /Lib/imaplib.py | |
parent | 5785a1391ed9ad444bfb5b00847416452a593d1b (diff) | |
download | cpython-7b9190b8fc416f97c17ca6461dd73967813516c7.zip cpython-7b9190b8fc416f97c17ca6461dd73967813516c7.tar.gz cpython-7b9190b8fc416f97c17ca6461dd73967813516c7.tar.bz2 |
Patch #998149: imaplib deleteacl and myrights.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 8ccf8b8..2bdabb2 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -46,12 +46,14 @@ Commands = { 'COPY': ('SELECTED',), 'CREATE': ('AUTH', 'SELECTED'), 'DELETE': ('AUTH', 'SELECTED'), + 'DELETEACL': ('AUTH', 'SELECTED'), 'EXAMINE': ('AUTH', 'SELECTED'), 'EXPUNGE': ('SELECTED',), 'FETCH': ('SELECTED',), 'GETACL': ('AUTH', 'SELECTED'), 'GETQUOTA': ('AUTH', 'SELECTED'), 'GETQUOTAROOT': ('AUTH', 'SELECTED'), + 'MYRIGHTS': ('AUTH', 'SELECTED'), 'LIST': ('AUTH', 'SELECTED'), 'LOGIN': ('NONAUTH',), 'LOGOUT': ('NONAUTH', 'AUTH', 'SELECTED', 'LOGOUT'), @@ -389,6 +391,12 @@ class IMAP4: """ return self._simple_command('DELETE', mailbox) + def deleteacl(self, mailbox, who): + """Delete the ACLs (remove any rights) set for who on mailbox. + + (typ, [data]) = <instance>.deleteacl(mailbox, who) + """ + return self._simple_command('DELETEACL', mailbox, who) def expunge(self): """Permanently remove deleted items from selected mailbox. @@ -518,6 +526,13 @@ class IMAP4: typ, dat = self._simple_command(name, directory, pattern) return self._untagged_response(typ, dat, name) + def myrights(self, mailbox): + """Show my ACLs for a mailbox (i.e. the rights that I have on mailbox). + + (typ, [data]) = <instance>.myrights(mailbox) + """ + typ,dat = self._simple_command('MYRIGHTS', mailbox) + return self._untagged_response(typ, dat, 'MYRIGHTS') def namespace(self): """ Returns IMAP namespaces ala rfc2342 |