1 Cone©
2
3MAIL::FOLDER::GETRIG(3x)Cone: COnsole Newsreader And EMAIL::FOLDER::GETRIG(3x)
4
5
6
8 mail::folder::getRights - Read access control list
9
11 #include <libmail/mail.H>
12
13
14 class myCallback : public mail::callback {
15 public:
16 void success(std::string msg);
17 void fail(std::string msg);
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
39 control 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 does
47 not implement anonymous access, then “anonymous”, “anyone”, and
48 “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, in
55 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. See
63 the server's documentation for information on creating and managing
64 groups (if the groups are even implemented by the server in the
65 first place).
66
67 “-identifier”
68 An access control list identifier may be prefixed by a “-”, which
69 refers to a “negative right”. Negative rights explicitly revoke the
70 associated access rights from the identifier instead of granting
71 the right.
72
73 Negative rights are not implemented by all servers. See the
74 server's documentation to check if the server implements negative
75 access rights.
76
77 Note
78 username and groupname must specified using the UTF-8 character
79 set.
80
81 Access rights
82 At this time, the following access rights are supported:
83
84 “a”
85 Administrator access: view and change folder access control lists.
86
87 “c”
88 Create subfolders.
89
90 “e”
91 Expunge deleted messages from the folder.
92
93 “i”
94 Insert, or add messages to the folder.
95
96 “l”
97 List, or view the folder's existence. If a folder does not have the
98 “l” access right, the server will not include this folder when it's
99 asked to list all folders in the folder directory. However, if the
100 “r” access right is present, the folder may be opened if the
101 folder's name is known.
102
103 “r”
104 Read, or open the folder. An attempt to open the folder will fail
105 without the “r” access right, even if the folder's name is known.
106
107 “p”
108 “Post messages” to the folder. This access right is currently
109 listed in the ACL specification; however its intention is not
110 clear, and most servers do not do anything useful with this access
111 right. It is listed here for information purposes only.
112
113 “s”
114 Allow changing the read/unread status of messages in the folder.
115 The server will not automatically clear the unread message status
116 flag on messages after they are read, or let this status flag be
117 explicitly changed, without the “s” access right.
118
119 “t”
120 Allow tagging of messages as deleted or undeleted. The server will
121 prohibit changing the messages' deleted message status flag without
122 the “t” access right.
123
124 “w”
125 Allow changing the draft, replied, and marked message status flags.
126 The server will not allow changes to these flags without the “w”
127 access right.
128
129 “x”
130 Allow this folder to be removed. The server will not this folder to
131 be deleted without the “x” access right.
132
134 The application must wait until callback's success or fail method is
135 invoked. The success method is invoked when this request is succesfully
136 processed. The fail method is invoked if this request cannot be
137 processed. The application must not destroy callback until either the
138 success or fail method is invoked.
139
140 Note
141 callback's fail method may be invoked even after other callback
142 methods were invoked. This indicates that the request was partially
143 completed before the error was encountered.
144
146 mail::account::delRights(3x), mail::account::getMyRights(3x),
147 mail::account::setRights(3x).
148
150 Sam Varshavchik
151
152
153
154Cone© 08/25/2016 MAIL::FOLDER::GETRIG(3x)