Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
crpb opened this issue Apr 11, 2023 · 1 comment
Assignees

Comments

@crpb
Copy link
Contributor

crpb commented Apr 11, 2023

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

@crpb
Copy link
Contributor Author

crpb commented Aug 16, 2024

Well, for now i can retrieve a the configured permissions with this w/o waiting on grommunio-admin to get loop over everything. 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants