@pnp/cli-microsoft365 5.3.0-beta.99da27d → 5.3.0-beta.9caead4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoRoleDefinitionListCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.ROLEDEFINITION_LIST;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Gets list of role definitions for the specified site';
|
|
13
|
+
}
|
|
14
|
+
defaultProperties() {
|
|
15
|
+
return ['Id', 'Name'];
|
|
16
|
+
}
|
|
17
|
+
commandAction(logger, args, cb) {
|
|
18
|
+
if (this.verbose) {
|
|
19
|
+
logger.logToStderr(`Getting role definitions list from ${args.options.webUrl}...`);
|
|
20
|
+
}
|
|
21
|
+
const requestOptions = {
|
|
22
|
+
url: `${args.options.webUrl}/_api/web/roledefinitions`,
|
|
23
|
+
headers: {
|
|
24
|
+
'accept': 'application/json;odata=nometadata'
|
|
25
|
+
},
|
|
26
|
+
responseType: 'json'
|
|
27
|
+
};
|
|
28
|
+
request_1.default
|
|
29
|
+
.get(requestOptions)
|
|
30
|
+
.then((response) => {
|
|
31
|
+
logger.log(response.value);
|
|
32
|
+
cb();
|
|
33
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
34
|
+
}
|
|
35
|
+
options() {
|
|
36
|
+
const options = [
|
|
37
|
+
{
|
|
38
|
+
option: '-u, --webUrl <webUrl>'
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
const parentOptions = super.options();
|
|
42
|
+
return options.concat(parentOptions);
|
|
43
|
+
}
|
|
44
|
+
validate(args) {
|
|
45
|
+
return utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
module.exports = new SpoRoleDefinitionListCommand();
|
|
49
|
+
//# sourceMappingURL=roledefinition-list.js.map
|
|
@@ -162,6 +162,7 @@ exports.default = {
|
|
|
162
162
|
REPORT_SITEUSAGEPAGES: `${prefix} report siteusagepages`,
|
|
163
163
|
REPORT_SITEUSAGESITECOUNTS: `${prefix} report siteusagesitecounts`,
|
|
164
164
|
REPORT_SITEUSAGESTORAGE: `${prefix} report siteusagestorage`,
|
|
165
|
+
ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
|
|
165
166
|
SEARCH: `${prefix} search`,
|
|
166
167
|
SERVICEPRINCIPAL_GRANT_ADD: `${prefix} serviceprincipal grant add`,
|
|
167
168
|
SERVICEPRINCIPAL_GRANT_LIST: `${prefix} serviceprincipal grant list`,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# spo roledefinition list
|
|
2
|
+
|
|
3
|
+
Gets list of role definitions for the specified site
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo roledefinition list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: URL of the site for which to retrieve role definitions
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
Return list of role definitions for site _https://contoso.sharepoint.com/sites/project-x_
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 spo roledefinition list --webUrl https://contoso.sharepoint.com/sites/project-x
|
|
24
|
+
```
|
package/package.json
CHANGED