mirror of
https://github.com/nextcloud/sharelisting.git
synced 2025-10-26 15:05:29 +01:00
No description
| .github | ||
| appinfo | ||
| lib | ||
| src | ||
| tests | ||
| vendor-bin | ||
| .babelrc.js | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitignore | ||
| .nextcloudignore | ||
| .php-cs-fixer.dist.php | ||
| .stylelintrc.js | ||
| babel.config.js | ||
| CHANGELOG.md | ||
| composer.json | ||
| composer.lock | ||
| krankerl.toml | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| psalm.xml | ||
| README.md | ||
| rector.php | ||
| webpack.js | ||
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 FORMATor--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"
}
]