1mail::folder::getRights(m3axi)l::folder Native API refermeanicle::folder::getRights(3x)
2
3
4
6 mail::folder::getRights - Read access control list
7
9 #include <libmail/mail.H>
10
11
12 class myCallback : public mail::callback {
13 public:
14 void success(std::string msg);
15 void fail(std::string msg);
16 };
17
18
19
20 folder->getRights (myCallback &callback,
21 std::list<std::pair<std::string, std::string> > &rights);
22
24 This function implements folder access control lists (ACLs). Access
25 control lists define who is allowed to do certain operations on a
26 folder, or on messages in the folder. Folder ACLs are implement only
27 for IMAP accounts on IMAP servers that implement access control lists.
28 This function will fail if folder is not a folder on an IMAP server
29 that supports access control lists.
30
31 This function obtains folder's entire access control list. If this
32 function succeeds (this function may fail if the requesting client does
33 not have the required access to the folder), rights will be initialized
34 to an array of identifier/accessrights tuples.
35
36 IDENTIFIER
37 Not all servers support every one of the following access control list
38 identifiers. See the server's documentation to check which access con‐
39 trol list identifiers are implemented by the server:
40
41 ``anonymous'', or ``anyone''
42 This identifier refers to universal access rights given to
43 everyone, including anonymous users (if supported by server).
44
45 ``authuser''
46 Same as ``anyone'', except for anonymous users. If the server
47 does not implement anonymous access, then ``anonymous'', ``any‐
48 one'', and ``authuser'' are equivalent.
49
50 ``owner''
51 The owner of the mailbox that contains the folder.
52
53 ``administrators''
54 Any member of a group that's defined as an administrator group,
55 in an implementation-defined way.
56
57 ``user=username''
58 A single system user, identified by username.
59
60 ``group=groupname''
61 Any system user that's part of a group identified by groupname.
62 Groups are created and managed by IMAP server-specific tools.
63 See the server's documentation for information on creating and
64 managing groups (if the groups are even implemented by the
65 server in the first place).
66
67 ``-identifier''
68 An access control list identifier may be prefixed by a ``-'',
69 which refers to a ``negative right''. Negative rights explic‐
70 itly revoke the associated access rights from the identifier
71 instead of granting the right.
72
73 Negative rights are not implemented by all servers. See the
74 server's documentation to check if the server implements nega‐
75 tive access rights.
76
77 Note: username and groupname must specified using the UTF-8
78 character set.
79
80 ACCESS RIGHTS
81 At this time, the following access rights are supported:
82
83 ``a'' Administrator access: view and change folder access control
84 lists.
85
86 ``c'' Create subfolders.
87
88 ``e'' Expunge deleted messages from the folder.
89
90 ``i'' Insert, or add messages to the folder.
91
92 ``l'' List, or view the folder's existence. If a folder does not have
93 the ``l'' access right, the server will not include this folder
94 when it's asked to list all folders in the folder directory.
95 However, if the ``r'' access right is present, the folder may be
96 opened if the folder's name is known.
97
98 ``r'' Read, or open the folder. An attempt to open the folder will
99 fail without the ``r'' access right, even if the folder's name
100 is known.
101
102 ``p'' ``Post messages'' to the folder. This access right is currently
103 listed in the ACL specification; however its intention is not
104 clear, and most servers do not do anything useful with this
105 access right. It is listed here for information purposes only.
106
107 ``s'' Allow changing the read/unread status of messages in the folder.
108 The server will not automatically clear the unread message sta‐
109 tus flag on messages after they are read, or let this status
110 flag be explicitly changed, without the ``s'' access right.
111
112 ``t'' Allow tagging of messages as deleted or undeleted. The server
113 will prohibit changing the messages' deleted message status flag
114 without the ``t'' access right.
115
116 ``w'' Allow changing the draft, replied, and marked message status
117 flags. The server will not allow changes to these flags without
118 the ``w'' access right.
119
120 ``x'' Allow this folder to be removed. The server will not this
121 folder to be deleted without the ``x'' access right.
122
124 The application must wait until callback's success or fail method is
125 invoked. The success method is invoked when this request is succes‐
126 fully processed. The fail method is invoked if this request cannot be
127 processed. The application must not destroy callback until either the
128 success or fail method is invoked.
129
130 Note: callback's fail method may be invoked even after other
131 callback methods were invoked. This indicates that the request
132 was partially completed before the error was encountered.
133
135 mail::account::delRights(3x), mail::account::getMyRights(3x),
136 mail::account::setRights(3x).
137
138
139
140 10 April 2006 mail::folder::getRights(3x)