Skip to content

exmdb user@domain.tld folder permissions [FolderID | --recursive] --format json-tree #12

Description

@crpb

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 user@domain.tld 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": "mbx1@domain.tld",
          "perms": "0x2000"
        },
        {
// Alternatively
          "user": "mbx2@domain.tld",
          "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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions