mail::folder::getMyRights
Prev | mail::folder Native API reference | Next

## Name

mail::folder::getMyRights — Compute my access rights on a folder

## Synopsis

#include <libmail/mail.H>
class myCallback : public mail::callback {
public:
void success(std::string msg);
void fail(std::string msg);
};

`folder->getMyRights(` | myCallback &callback,
| std::string &rights`)`;

## USAGE

This function implements folder access control lists (ACLs). Access control lists define who is allowed to do certain operations on a folder, or on messages in the folder. Folder ACLs are implement only for IMAP accounts on IMAP servers that implement access control lists. This function will fail if `folder` is not a folder on an IMAP server that supports access control lists.

This function computes application's access rights on the `folder`. If this function succeeds (this function may fail if the requesting client does not have the required access to the folder), `rights` will be initialized by a text string that contains a list of character which describe the requested client's access rights on the folder.

At this time, the following access rights are supported:

“`a`”

  Administrator access: view and change folder access control lists.

“`c`”

  Create subfolders.

“`e`”

  Expunge deleted messages from the folder.

“`i`”

  Insert, or add messages to the folder.

“`l`”

  List, or view the folder's existence. If a folder does not have the “`l`” access right, the server will not include this folder when it's asked to list all folders in the folder directory. However, if the “`r`” access right is present, the folder may be opened if the folder's name is known.

“`r`”

  Read, or open the folder. An attempt to open the folder will fail without the “`r`” access right, even if the folder's name is known.

“`p`”

  “Post messages” to the folder. This access right is currently listed in the ACL specification; however its intention is not clear, and most servers do not do anything useful with this access right. It is listed here for information purposes only.

“`s`”

  Allow changing the read/unread status of messages in the folder. The server will not automatically clear the `unread` message status flag on messages after they are read, or let this status flag be explicitly changed, without the “`s`” access right.

“`t`”

  Allow tagging of messages as deleted or undeleted. The server will prohibit changing the messages' `deleted` message status flag without the “`t`” access right.

“`w`”

  Allow changing the `draft`, `replied`, and `marked` message status flags. The server will not allow changes to these flags without the “`w`” access right.

“`x`”

  Allow this folder to be removed. The server will not this folder to be deleted without the “`x`” access right.

## RETURN CODES AND CALLBACKS

The application must wait until `callback`'s `success` or `fail` method is invoked. The `success` method is invoked when this request is succesfully processed. The `fail` method is invoked if this request cannot be processed. The application must not destroy `callback` until either the `success` or `fail` method is invoked.

### Note

`callback`'s `fail` method may be invoked even after other callback methods were invoked. This indicates that the request was partially completed before the error was encountered.

## SEE ALSO

mail::account::delRights(3x), mail::account::getFolderIndexInfo(3x), mail::account::getRights(3x), mail::account::setRights(3x).

Prev | Up | Next
mail::folder::destroy | Home | ToC | mail::folder::getName