1MAIL::ACCOUNT::SETRI(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::SETRI(3x)
2
3
4

NAME

6       mail::ACCOUNT::setRights - Change access control lists
7

SYNOPSIS

9       #include <libmail/sync.H>
10
11       mail::ACCOUNT *mail;
12       mail::folder *folder;
13
14       bool ok=mail->setRights(mail::folder *folder,
15                               std::string &errorIdentifier,
16                               std::vector<std::string> &errorRights,
17                               std::string identifier, std::string rights);
18

USAGE

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

RETURN CODES AND CALLBACKS

164       This method returns true if it succeeds, or false if it fails. If the
165       method fails, use mail::ACCOUNT::getErrmsg() to read a brief
166       description of the error.
167

SEE ALSO

169       mail::ACCOUNT::delRights(3x), mail::ACCOUNT::getMyRights(3x),
170       mail::ACCOUNT::getRights(3x).
171
172
173
174[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::SETRI(3x)
Impressum