diff options
author | Dennis Kaarsemaker <dennis@kaarsemaker.net> | 2016-02-22 21:04:10 +0100 |
---|---|---|
committer | Dennis Kaarsemaker <dennis@kaarsemaker.net> | 2016-03-23 07:44:13 +0100 |
commit | 3ac6d9fe93279d74d36a6bf2b6e2ba182ed3bf34 (patch) | |
tree | 681d3c36caa3f2680ca5b810c09f3d1f54a868cd /protocols/account.h | |
parent | d701547347b15bd76f19fcf667cbf8e5c1219cbb (diff) |
Support for locked-down accounts
In certain situations, e.g. when working with pregenerated
configurations, it is useful to be able lock down accounts so they
cannot be deleted and authentication information (user, password,
server) cannot be changed.
We mark such sensitive settings with ACC_SET_LOCKABLE and will refuse to
change them if the account is locked by setting the ACC_FLAG_LOCKED
flag.
This flag is stored in the xml files as account attribute locked="true".
Diffstat (limited to 'protocols/account.h')
-rw-r--r-- | protocols/account.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/protocols/account.h b/protocols/account.h index 0e118680..bea8ca9f 100644 --- a/protocols/account.h +++ b/protocols/account.h @@ -62,6 +62,7 @@ int protocol_account_islocal(const char* protocol); typedef enum { ACC_SET_OFFLINE_ONLY = 0x02, /* Allow changes only if the acct is offline. */ ACC_SET_ONLINE_ONLY = 0x04, /* Allow changes only if the acct is online. */ + ACC_SET_LOCKABLE = 0x08 /* Setting cannot be changed if the account is locked down */ } account_set_flag_t; typedef enum { @@ -69,6 +70,7 @@ typedef enum { ACC_FLAG_STATUS_MESSAGE = 0x02, /* Supports status messages (without being away). */ ACC_FLAG_HANDLE_DOMAINS = 0x04, /* Contact handles need a domain portion. */ ACC_FLAG_LOCAL = 0x08, /* Contact list is local. */ + ACC_FLAG_LOCKED = 0x10, /* Account is locked (cannot be deleted, certain settings can't changed) */ } account_flag_t; #endif |