Перейти к файлу
dependabot[bot] 299cf632e8
Merge pull request #509 from nextcloud/dependabot/npm_and_yarn/relative-ci/agent-4.2.13
2024-11-02 02:26:07 +00:00
.github chore: update Git workflows 2023-11-27 10:29:12 +01:00
appinfo 1.2.0 2023-11-27 11:07:36 +01:00
lib Fix log flood 2023-11-27 12:10:34 +01:00
src chore(JS): fix eslint errors 2023-11-27 11:07:34 +01:00
tests Fix The "user" option does not exist 2022-07-01 16:04:39 +02:00
.babelrc.js Add subfolder listing to sharing tab 2019-10-11 08:30:17 +02:00
.eslintignore Fix eslint config 2022-06-23 11:58:48 +02:00
.eslintrc.js Fix eslint config 2022-06-23 11:58:48 +02:00
.gitignore Add subfolder listing to sharing tab 2019-10-11 08:30:17 +02:00
.nextcloudignore Move to nextcloudignore 2021-02-15 09:07:36 +01:00
.stylelintrc.js Add subfolder listing to sharing tab 2019-10-11 08:30:17 +02:00
CHANGELOG.md chore: update changelog 2023-11-27 12:39:08 +01:00
LICENSE Initial commit 2018-05-03 14:50:42 +02:00
Makefile Also list files and update layout 2019-10-13 20:51:26 +02:00
README.md Add CSV output format 2022-10-11 11:29:47 +00:00
babel.config.js Fix eslint config 2022-06-23 11:58:48 +02:00
composer.json chore(PHP): fix CI errors 2023-11-27 11:07:31 +01:00
composer.lock Add CSV output format 2022-10-11 11:29:47 +00:00
krankerl.toml Move to nextcloudignore 2021-02-15 09:07:36 +01:00
package-lock.json Bump @relative-ci/agent from 4.2.12 to 4.2.13 2024-11-02 02:22:44 +00:00
package.json Bump @relative-ci/agent from 4.2.12 to 4.2.13 2024-11-02 02:22:44 +00:00
psalm.xml Add compability with 24 2022-05-10 13:55:52 +02:00
webpack.js Update webpack script 2022-06-23 11:54:33 +02:00

README.md

ShareListing

This app allows generating reports of shares on the system.

Usage

Command

./occ sharing:list [-u|--user [USER]] [-p|--path [PATH]] [-t|--token [TOKEN]] [-f|--filter [FILTER]] [-o|--output FORMAT]

Without options, the command yields the unfiltered list of all shares.
With options, the list is narrowed down using the filters set.

Options

  • -u [USER] or --user [USER]
    List only shares of the given user.
  • -p [PATH] or --path [PATH]
    List only shares within the given path.
  • -t [TOKEN] or --token [TOKEN]
    List only shares that use a token that (at least partly) matches the argument.
  • -f [FILTER] or --filter [FILTER]
    List only shares where the TYPE matches the argument.
    Possible values for the filter argument: {owner, initiator, recipient}
  • -o FORMAT or --output FORMAT
    Set the output format (json or csv, default is json).

Examples

To better illustrate how the app work see the examples below:

Example 1

Listing all shares user0 is a participant in (be it owner, initiator or recipient):

./occ sharing:list --user user0

[
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:26+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user1"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:34:58+00:00",
        "permissions": 31,
        "path": "\/F2",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:35:02+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:43+00:00",
        "permissions": 1,
        "path": "\/F1\/SF1",
        "type": "link",
        "token": "eoT8kF5B9jtmMda"
    }
]

Example 2

Listing all shares user0 is a participant in (be it owner, initiator or recipient) limited to the path F1

./occ sharing:list --user user0 --path F1

[
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:26+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user1"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:35:02+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:43+00:00",
        "permissions": 1,
        "path": "\/F1\/SF1",
        "type": "link",
        "token": "eoT8kF5B9jtmMda"
    }
]

Example 3

List all info about all shares

./occ sharing:list

[
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:34:58+00:00",
        "permissions": 31,
        "path": "\/F2",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:35:02+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:26+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user1"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:43+00:00",
        "permissions": 1,
        "path": "\/F1\/SF1",
        "type": "link",
        "token": "eoT8kF5B9jtmMda"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:26+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user1"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:34:58+00:00",
        "permissions": 31,
        "path": "\/F2",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "admin",
        "time": "2018-04-24T07:35:02+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user0"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:43+00:00",
        "permissions": 1,
        "path": "\/F1\/SF1",
        "type": "link",
        "token": "eoT8kF5B9jtmMda"
    }
]

Example 4

List all shares that user0 is the initiator of in the path F1 (of that user).

./occ sharing:list --user user0 --path F1 --filter initiator

[
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:26+00:00",
        "permissions": 31,
        "path": "\/F1",
        "type": "user",
        "recipient": "user1"
    },
    {
        "owner": "admin",
        "initiator": "user0",
        "time": "2018-04-24T08:29:43+00:00",
        "permissions": 1,
        "path": "\/F1\/SF1",
        "type": "link",
        "token": "eoT8kF5B9jtmMda"
    }
]