-
Notifications
You must be signed in to change notification settings - Fork 16
exmdb [email protected] folder permissions [FolderID | --recursive] --format json-tree #12
Description
In reference to #5 it would be nice to have the possibility to get those extended formats also with the command in the topic and even better would be the possibility to list all non-default permissions for [email protected] on the mailbox recursively.
This would make things like problem-solving(because of wrong permissions) and even an "Audit" much easier.
I know i can read all those entries from the sqlite-db's but i think this would be nice to access it via the the cli or at a later point even with the webapi.
For now i scribbled together the following to retrieve a quick overview.
I also looked a bit at ./cli/exmdb.py but wasn't really sure how to best implement the return of the permissions. Maybe something like this?
{
"folders": [
{
"ID": 9,
"parentID": 1,
"name": "Top of Information Store",
"subfolders": [...],
"permissions": [
{
"user": "[email protected]",
"perms": "0x2000"
},
{
// Alternatively
"user": "[email protected]",
"numeric": "0x041b",
"permissions": "readany,create,editowned,deleteowned,foldervisible"
\\ Alternatively
},
...
]
},
],
"permissions": [
{
"readany": "0x1",
"create": "0x2",
"sendas": "0x4",
"editowned": "0x8",
"deleteowned": "0x10",
"editany": "0x20",
"deleteany": "0x40",
"createsubfolder": "0x80",
"folderowner": "0x100",
"foldercontact": "0x200",
"foldervisible": "0x400",
"freebusysimple": "0x800",
"freebusydetailed": "0x1000",
"storeowner": "0x2000"
}
]
}
The extra "permissions" might also be requested with an additional switch and by default not be returned depending on the return i guess not needed anyhow.
~crpb