1mail::ACCOUNT::getRigmhatisl(:3:xA)CCOUNT Synchronous API rmeafielr:e:nAcCeCOUNT::getRights(3x)
2
3
4

NAME

6       mail::ACCOUNT::getRights - Read access control list
7

SYNOPSIS

9       #include <libmail/sync.H>
10
11       mail::ACCOUNT *mail;
12       mail::folder *folder;
13
14
15
16       bool          ok=mail->getRights         (mail::folder         *folder,
17       std::list<std::pair<std::string, 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  obtains  folder's  entire access control list.  If this
28       function succeeds (this function may fail if the requesting client does
29       not have the required access to the folder), rights will be initialized
30       to an array of identifier/accessrights tuples.
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 con‐
35       trol 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
43              does not implement anonymous access, then ``anonymous'',  ``any‐
44              one'', and ``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,
51              in 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.
59              See the server's documentation for information on  creating  and
60              managing  groups  (if  the  groups  are  even implemented by the
61              server in the first place).
62
63       ``-identifier''
64              An access control list identifier may be prefixed  by  a  ``-'',
65              which  refers  to a ``negative right''.  Negative rights explic‐
66              itly revoke the associated access  rights  from  the  identifier
67              instead of granting the right.
68
69              Negative  rights  are  not  implemented by all servers.  See the
70              server's documentation to check if the server  implements  nega‐
71              tive access rights.
72
73              Note:  username  and  groupname  must  specified using the UTF-8
74              character set.
75
76   ACCESS RIGHTS
77       At this time, the following access rights are supported:
78
79       ``a''  Administrator access: view  and  change  folder  access  control
80              lists.
81
82       ``c''  Create subfolders.
83
84       ``e''  Expunge deleted messages from the folder.
85
86       ``i''  Insert, or add messages to the folder.
87
88       ``l''  List, or view the folder's existence.  If a folder does not have
89              the ``l'' access right, the server will not include this  folder
90              when  it's  asked  to  list all folders in the folder directory.
91              However, if the ``r'' access right is present, the folder may be
92              opened if the folder's name is known.
93
94       ``r''  Read,  or  open  the folder.  An attempt to open the folder will
95              fail without the ``r'' access right, even if the  folder's  name
96              is known.
97
98       ``p''  ``Post messages'' to the folder.  This access right is currently
99              listed in the ACL specification; however its  intention  is  not
100              clear,  and  most  servers  do  not do anything useful with this
101              access right.  It is listed here for information purposes only.
102
103       ``s''  Allow changing the read/unread status of messages in the folder.
104              The  server will not automatically clear the unread message sta‐
105              tus flag on messages after they are read,  or  let  this  status
106              flag be explicitly changed, without the ``s'' access right.
107
108       ``t''  Allow  tagging  of messages as deleted or undeleted.  The server
109              will prohibit changing the messages' deleted message status flag
110              without the ``t'' access right.
111
112       ``w''  Allow  changing  the  draft,  replied, and marked message status
113              flags.  The server will not allow changes to these flags without
114              the ``w'' access right.
115
116       ``x''  Allow  this  folder  to  be  removed.   The server will not this
117              folder to be deleted without the ``x'' access right.
118

RETURN CODES AND CALLBACKS

120       This method returns true if it succeeds, or false if it fails.  If  the
121       method  fails,  use mail::ACCOUNT::getErrmsg() to read a brief descrip‐
122       tion of the error.
123

SEE ALSO

125       mail::ACCOUNT::delRights(3x),           mail::ACCOUNT::getMyRights(3x),
126       mail::ACCOUNT::setRights(3x).
127
128
129
130                                 10 April 2006    mail::ACCOUNT::getRights(3x)
Impressum