1 Cone©
2
3MAIL::ACCOUNT::DELRI(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::DELRI(3x)
4
5
6
8 mail::ACCOUNT::delRights - Delete an access control list identifier
9
11 #include <libmail/sync.H>
12
13 mail::ACCOUNT *mail;
14 mail::folder *folder;
15
16 bool ok=mail->delRights(mail::folder *folder,
17 std::string &errorIdentifier,
18 std::vector<std::string> &errorRights,
19 std::string identifier);
20
22 This function implements folder access control lists (ACLs). Access
23 control lists define who is allowed to do certain operations on a
24 folder, or on messages in the folder. Folder ACLs are implement only
25 for IMAP accounts on IMAP servers that implement access control lists.
26 This function will fail if folder is not a folder on an IMAP server
27 that supports access control lists.
28
29 mail::folder::delRights removes identifier from the folder's access
30 control list.
31
32 Identifier
33 Not all servers support every one of the following access control list
34 identifiers. See the server's documentation to check which access
35 control list identifiers are implemented by the server:
36
37 “anonymous”, or “anyone”
38 This identifier refers to universal access rights given to
39 everyone, including anonymous users (if supported by server).
40
41 “authuser”
42 Same as “anyone”, except for anonymous users. If the server does
43 not implement anonymous access, then “anonymous”, “anyone”, and
44 “authuser” are equivalent.
45
46 “owner”
47 The owner of the mailbox that contains the folder.
48
49 “administrators”
50 Any member of a group that's defined as an administrator group, in
51 an implementation-defined way.
52
53 “user=username”
54 A single system user, identified by username.
55
56 “group=groupname”
57 Any system user that's part of a group identified by groupname.
58 Groups are created and managed by IMAP server-specific tools. See
59 the server's documentation for information on creating and managing
60 groups (if the groups are even implemented by the server in the
61 first place).
62
63 “-identifier”
64 An access control list identifier may be prefixed by a “-”, which
65 refers to a “negative right”. Negative rights explicitly revoke the
66 associated access rights from the identifier instead of granting
67 the right.
68
69 Negative rights are not implemented by all servers. See the
70 server's documentation to check if the server implements negative
71 access rights.
72
73 Note
74 username and groupname must specified using the UTF-8 character
75 set.
76
77 Access rights
78 At this time, the following access rights are supported:
79
80 “a”
81 Administrator access: view and change folder access control lists.
82
83 “c”
84 Create subfolders.
85
86 “e”
87 Expunge deleted messages from the folder.
88
89 “i”
90 Insert, or add messages to the folder.
91
92 “l”
93 List, or view the folder's existence. If a folder does not have the
94 “l” access right, the server will not include this folder when it's
95 asked to list all folders in the folder directory. However, if the
96 “r” access right is present, the folder may be opened if the
97 folder's name is known.
98
99 “r”
100 Read, or open the folder. An attempt to open the folder will fail
101 without the “r” access right, even if the folder's name is known.
102
103 “p”
104 “Post messages” to the folder. This access right is currently
105 listed in the ACL specification; however its intention is not
106 clear, and most servers do not do anything useful with this access
107 right. It is listed here for information purposes only.
108
109 “s”
110 Allow changing the read/unread status of messages in the folder.
111 The server will not automatically clear the unread message status
112 flag on messages after they are read, or let this status flag be
113 explicitly changed, without the “s” access right.
114
115 “t”
116 Allow tagging of messages as deleted or undeleted. The server will
117 prohibit changing the messages' deleted message status flag without
118 the “t” access right.
119
120 “w”
121 Allow changing the draft, replied, and marked message status flags.
122 The server will not allow changes to these flags without the “w”
123 access right.
124
125 “x”
126 Allow this folder to be removed. The server will not this folder to
127 be deleted without the “x” access right.
128
129 Extended error reporting
130 Most IMAP servers have restrictions on which combinations of access
131 rights are valid for which folders. See the IMAP server's documentation
132 to check for any access rights restrictions. The most common
133 restriction is that the “e”, “t”, and “x” access rights must either be
134 set together, as a group, or not. The server will reject or ignore an
135 attempt to set prohibited combinations of access rights for a given
136 folder.
137
138 Some IMAP servers implement an extended form of the access control list
139 protocol which makes it possible to obtain the server's restrictions.
140 When an attempt to set an invalid access right combination is rejected,
141 errorIdentifier will be set to indicate which identifier's access right
142 combination was rejected (usually it will be set to the same value as
143 identifier.
144
145 errorRights will be set to an array of strings, each strings consisting
146 of one or more access rights. The first array element, errorRights[0]
147 will contain the minimum access rights required for this folder (which
148 may be an empty string if the folder does not require any minimum
149 access rights for the identifier). Each remaining string lists an
150 optional access right allowed for this folder. If a string contains
151 more than one access right, it means that these access rights must be
152 added or removed from the access control list together, as a group.
153
155 This method returns true if it succeeds, or false if it fails. If the
156 method fails, use mail::ACCOUNT::getErrmsg() to read a brief
157 description of the error.
158
160 mail::ACCOUNT::getMyRights(3x), mail::ACCOUNT::getRights(3x),
161 mail::ACCOUNT::setRights(3x).
162
164 Sam Varshavchik
165
166
167
168Cone© 08/25/2016 MAIL::ACCOUNT::DELRI(3x)