Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3fd6a09d
Commit
3fd6a09d
authored
Jul 27, 2004
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #998149: imaplib deleteacl and myrights.
parent
486e4821
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
Doc/lib/libimaplib.tex
Doc/lib/libimaplib.tex
+8
-0
Lib/imaplib.py
Lib/imaplib.py
+15
-0
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/lib/libimaplib.tex
View file @
3fd6a09d
...
...
@@ -182,6 +182,10 @@ data = authobject(response)
Delete old mailbox named
\var
{
mailbox
}
.
\end{methoddesc}
\begin{methoddesc}
{
deleteacl
}{
mailbox, who
}
Delete the ACLs (remove any rights) set for who on mailbox.
\end{methoddesc}
\begin{methoddesc}
{
expunge
}{}
Permanently remove deleted items from selected mailbox. Generates an
\samp
{
EXPUNGE
}
response for each deleted message. Returned data
...
...
@@ -242,6 +246,10 @@ data = authobject(response)
Returned data are tuples of message part envelope and data.
\end{methoddesc}
\begin{methoddes}
{
myrights
}{
mailbox
}
Show my ACLs for a mailbox (i.e. the rights that I have on mailbox).
\end{methoddesc}
\begin{methoddesc}
{
namespace
}{}
Returns IMAP namespaces as defined in RFC2342.
\versionadded
{
2.3
}
...
...
Lib/imaplib.py
View file @
3fd6a09d
...
...
@@ -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
...
...
Misc/ACKS
View file @
3fd6a09d
...
...
@@ -328,6 +328,7 @@ Holger Krekel
Hannu Krosing
Andrew Kuchling
Vladimir Kushnir
Arnaud Mazin
Cameron Laird
Tino Lange
Andrew Langmead
...
...
Misc/NEWS
View file @
3fd6a09d
...
...
@@ -44,6 +44,8 @@ Extension modules
Library
-------
-
imaplib
has
two
new
methods
:
deleteacl
and
myrights
.
-
nntplib
has
two
new
methods
:
description
and
descriptions
.
They
use
a
more
RFC
-
compliant
way
of
getting
a
newsgroup
description
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment