@esri/hub-common 11.23.3 → 12.0.0-alpha.2
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.
- package/dist/esm/ArcGISContext.js +38 -1
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/ArcGISContextManager.js +48 -0
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/content/_internal.js +8 -18
- package/dist/esm/content/_internal.js.map +1 -1
- package/dist/esm/content/compose.js +12 -0
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +39 -57
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/_internal/PropertyMapper.js +10 -2
- package/dist/esm/core/_internal/PropertyMapper.js.map +1 -1
- package/dist/esm/core/_internal/getBasePropertyMap.js +1 -0
- package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js +0 -68
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/esm/core/fetchHubEntity.js +28 -0
- package/dist/esm/core/fetchHubEntity.js.map +1 -0
- package/dist/esm/core/getTypeFromEntity.js +26 -0
- package/dist/esm/core/getTypeFromEntity.js.map +1 -0
- package/dist/esm/core/index.js +2 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/types/HubEntity.js +1 -0
- package/dist/esm/core/types/HubEntity.js.map +1 -0
- package/dist/esm/core/types/HubEntityType.js +1 -0
- package/dist/esm/core/types/HubEntityType.js.map +1 -0
- package/dist/esm/core/types/ISystemStatus.js +21 -0
- package/dist/esm/core/types/ISystemStatus.js.map +1 -0
- package/dist/esm/core/types/index.js +3 -2
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +0 -13
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +71 -0
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAlphaGating.js +27 -0
- package/dist/esm/permissions/_internal/checkAlphaGating.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAssertion.js +190 -0
- package/dist/esm/permissions/_internal/checkAssertion.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAssertions.js +20 -0
- package/dist/esm/permissions/_internal/checkAssertions.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAuthentication.js +28 -0
- package/dist/esm/permissions/_internal/checkAuthentication.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEdit.js +38 -0
- package/dist/esm/permissions/_internal/checkEdit.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEntityPolicy.js +68 -0
- package/dist/esm/permissions/_internal/checkEntityPolicy.js.map +1 -0
- package/dist/esm/permissions/_internal/checkLicense.js +33 -0
- package/dist/esm/permissions/_internal/checkLicense.js.map +1 -0
- package/dist/esm/permissions/_internal/checkOwner.js +36 -0
- package/dist/esm/permissions/_internal/checkOwner.js.map +1 -0
- package/dist/esm/permissions/_internal/checkPrivileges.js +31 -0
- package/dist/esm/permissions/_internal/checkPrivileges.js.map +1 -0
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js +47 -0
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js.map +1 -0
- package/dist/esm/permissions/checkPermission.js +89 -0
- package/dist/esm/permissions/checkPermission.js.map +1 -0
- package/dist/esm/permissions/index.js +5 -0
- package/dist/esm/permissions/index.js.map +1 -0
- package/dist/esm/permissions/types/HubLicense.js +1 -0
- package/dist/esm/permissions/types/HubLicense.js.map +1 -0
- package/dist/esm/permissions/types/IAccessResponse.js +1 -0
- package/dist/esm/permissions/types/IAccessResponse.js.map +1 -0
- package/dist/esm/permissions/types/IEntityPermissionPolicy.js +1 -0
- package/dist/esm/permissions/types/IEntityPermissionPolicy.js.map +1 -0
- package/dist/esm/permissions/types/IPermissionPolicy.js +1 -0
- package/dist/esm/permissions/types/IPermissionPolicy.js.map +1 -0
- package/dist/esm/permissions/types/IPolicyCheck.js +1 -0
- package/dist/esm/permissions/types/IPolicyCheck.js.map +1 -0
- package/dist/esm/permissions/types/Permission.js +17 -0
- package/dist/esm/permissions/types/Permission.js.map +1 -0
- package/dist/esm/permissions/types/PlatformPrivilege.js +5 -0
- package/dist/esm/permissions/types/PlatformPrivilege.js.map +1 -0
- package/dist/esm/permissions/types/PolicyResponse.js +4 -0
- package/dist/esm/permissions/types/PolicyResponse.js.map +1 -0
- package/dist/esm/permissions/types/index.js +9 -0
- package/dist/esm/permissions/types/index.js.map +1 -0
- package/dist/esm/permissions/utils.js +26 -0
- package/dist/esm/permissions/utils.js.map +1 -0
- package/dist/esm/projects/HubProject.js +0 -13
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectPermissionPolicies.js +41 -0
- package/dist/esm/projects/_internal/ProjectPermissionPolicies.js.map +1 -0
- package/dist/esm/projects/defaults.js +1 -0
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/sites/HubSite.js +0 -13
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/HubSites.js +10 -12
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/_internal/SitesPermissionPolicies.js +44 -0
- package/dist/esm/sites/_internal/SitesPermissionPolicies.js.map +1 -0
- package/dist/esm/sites/_internal/applyPermissionMigration.js +52 -0
- package/dist/esm/sites/_internal/applyPermissionMigration.js.map +1 -0
- package/dist/node/ArcGISContext.js +42 -5
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +48 -0
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/content/_internal.js +8 -18
- package/dist/node/content/_internal.js.map +1 -1
- package/dist/node/content/compose.js +12 -0
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +38 -56
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/_internal/PropertyMapper.js +9 -1
- package/dist/node/core/_internal/PropertyMapper.js.map +1 -1
- package/dist/node/core/_internal/getBasePropertyMap.js +1 -0
- package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/node/core/behaviors/IWithPermissionBehavior.js +0 -73
- package/dist/node/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/node/core/fetchHubEntity.js +32 -0
- package/dist/node/core/fetchHubEntity.js.map +1 -0
- package/dist/node/core/getTypeFromEntity.js +30 -0
- package/dist/node/core/getTypeFromEntity.js.map +1 -0
- package/dist/node/core/index.js +2 -1
- package/dist/node/core/index.js.map +1 -1
- package/dist/node/core/types/{IHubPermission.js → HubEntity.js} +1 -1
- package/dist/node/core/types/HubEntity.js.map +1 -0
- package/dist/node/core/types/HubEntityType.js +3 -0
- package/dist/node/core/types/HubEntityType.js.map +1 -0
- package/dist/node/core/types/ISystemStatus.js +25 -0
- package/dist/node/core/types/ISystemStatus.js.map +1 -0
- package/dist/node/core/types/index.js +3 -2
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +0 -13
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +75 -0
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -0
- package/dist/node/permissions/_internal/checkAlphaGating.js +31 -0
- package/dist/node/permissions/_internal/checkAlphaGating.js.map +1 -0
- package/dist/node/permissions/_internal/checkAssertion.js +194 -0
- package/dist/node/permissions/_internal/checkAssertion.js.map +1 -0
- package/dist/node/permissions/_internal/checkAssertions.js +24 -0
- package/dist/node/permissions/_internal/checkAssertions.js.map +1 -0
- package/dist/node/permissions/_internal/checkAuthentication.js +32 -0
- package/dist/node/permissions/_internal/checkAuthentication.js.map +1 -0
- package/dist/node/permissions/_internal/checkEdit.js +42 -0
- package/dist/node/permissions/_internal/checkEdit.js.map +1 -0
- package/dist/node/permissions/_internal/checkEntityPolicy.js +72 -0
- package/dist/node/permissions/_internal/checkEntityPolicy.js.map +1 -0
- package/dist/node/permissions/_internal/checkLicense.js +37 -0
- package/dist/node/permissions/_internal/checkLicense.js.map +1 -0
- package/dist/node/permissions/_internal/checkOwner.js +40 -0
- package/dist/node/permissions/_internal/checkOwner.js.map +1 -0
- package/dist/node/permissions/_internal/checkPrivileges.js +35 -0
- package/dist/node/permissions/_internal/checkPrivileges.js.map +1 -0
- package/dist/node/permissions/_internal/getPolicyResponseCode.js +51 -0
- package/dist/node/permissions/_internal/getPolicyResponseCode.js.map +1 -0
- package/dist/node/permissions/checkPermission.js +93 -0
- package/dist/node/permissions/checkPermission.js.map +1 -0
- package/dist/node/permissions/index.js +8 -0
- package/dist/node/permissions/index.js.map +1 -0
- package/dist/node/permissions/types/HubLicense.js +3 -0
- package/dist/node/permissions/types/HubLicense.js.map +1 -0
- package/dist/node/permissions/types/IAccessResponse.js +3 -0
- package/dist/node/permissions/types/IAccessResponse.js.map +1 -0
- package/dist/node/permissions/types/IEntityPermissionPolicy.js +3 -0
- package/dist/node/permissions/types/IEntityPermissionPolicy.js.map +1 -0
- package/dist/node/permissions/types/IPermissionPolicy.js +3 -0
- package/dist/node/permissions/types/IPermissionPolicy.js.map +1 -0
- package/dist/node/permissions/types/IPolicyCheck.js +3 -0
- package/dist/node/permissions/types/IPolicyCheck.js.map +1 -0
- package/dist/node/permissions/types/Permission.js +21 -0
- package/dist/node/permissions/types/Permission.js.map +1 -0
- package/dist/node/permissions/types/PlatformPrivilege.js +7 -0
- package/dist/node/permissions/types/PlatformPrivilege.js.map +1 -0
- package/dist/node/permissions/types/PolicyResponse.js +6 -0
- package/dist/node/permissions/types/PolicyResponse.js.map +1 -0
- package/dist/node/permissions/types/index.js +12 -0
- package/dist/node/permissions/types/index.js.map +1 -0
- package/dist/node/permissions/utils.js +31 -0
- package/dist/node/permissions/utils.js.map +1 -0
- package/dist/node/projects/HubProject.js +0 -13
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectPermissionPolicies.js +44 -0
- package/dist/node/projects/_internal/ProjectPermissionPolicies.js.map +1 -0
- package/dist/node/projects/defaults.js +1 -0
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/sites/HubSite.js +0 -13
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/HubSites.js +10 -12
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/_internal/SitesPermissionPolicies.js +47 -0
- package/dist/node/sites/_internal/SitesPermissionPolicies.js.map +1 -0
- package/dist/node/sites/_internal/applyPermissionMigration.js +56 -0
- package/dist/node/sites/_internal/applyPermissionMigration.js.map +1 -0
- package/dist/types/ArcGISContext.d.ts +33 -1
- package/dist/types/ArcGISContextManager.d.ts +6 -1
- package/dist/types/content/_internal.d.ts +15 -5
- package/dist/types/core/HubItemEntity.d.ts +29 -4
- package/dist/types/core/behaviors/IWithPermissionBehavior.d.ts +23 -35
- package/dist/types/core/behaviors/IWithStoreBehavior.d.ts +10 -10
- package/dist/types/core/fetchHubEntity.d.ts +11 -0
- package/dist/types/core/getTypeFromEntity.d.ts +8 -0
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/core/traits/IWithPermissions.d.ts +3 -3
- package/dist/types/core/types/HubEntity.d.ts +5 -0
- package/dist/types/core/types/HubEntityType.d.ts +1 -0
- package/dist/types/core/types/IHubContent.d.ts +2 -1
- package/dist/types/core/types/IHubItemEntity.d.ts +19 -2
- package/dist/types/core/types/ISystemStatus.d.ts +22 -0
- package/dist/types/core/types/index.d.ts +3 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiatives/HubInitiative.d.ts +1 -7
- package/dist/types/permissions/HubPermissionPolicies.d.ts +11 -0
- package/dist/types/permissions/_internal/checkAlphaGating.d.ts +10 -0
- package/dist/types/permissions/_internal/checkAssertion.d.ts +11 -0
- package/dist/types/permissions/_internal/checkAssertions.d.ts +10 -0
- package/dist/types/permissions/_internal/checkAuthentication.d.ts +10 -0
- package/dist/types/permissions/_internal/checkEdit.d.ts +10 -0
- package/dist/types/permissions/_internal/checkEntityPolicy.d.ts +9 -0
- package/dist/types/permissions/_internal/checkLicense.d.ts +10 -0
- package/dist/types/permissions/_internal/checkOwner.d.ts +10 -0
- package/dist/types/permissions/_internal/checkPrivileges.d.ts +10 -0
- package/dist/types/permissions/_internal/getPolicyResponseCode.d.ts +7 -0
- package/dist/types/permissions/checkPermission.d.ts +10 -0
- package/dist/types/permissions/index.d.ts +4 -0
- package/dist/types/permissions/types/HubLicense.d.ts +4 -0
- package/dist/types/permissions/types/IAccessResponse.d.ts +34 -0
- package/dist/types/permissions/types/IEntityPermissionPolicy.d.ts +22 -0
- package/dist/types/permissions/types/IPermissionPolicy.d.ts +57 -0
- package/dist/types/permissions/types/IPolicyCheck.d.ts +25 -0
- package/dist/types/permissions/types/Permission.d.ts +17 -0
- package/dist/types/permissions/types/PlatformPrivilege.d.ts +5 -0
- package/dist/types/permissions/types/PolicyResponse.d.ts +4 -0
- package/dist/types/permissions/types/index.d.ts +8 -0
- package/dist/types/permissions/utils.d.ts +18 -0
- package/dist/types/projects/HubProject.d.ts +1 -7
- package/dist/types/projects/_internal/ProjectPermissionPolicies.d.ts +8 -0
- package/dist/types/sites/HubSite.d.ts +1 -7
- package/dist/types/sites/HubSites.d.ts +1 -1
- package/dist/types/sites/_internal/SitesPermissionPolicies.d.ts +11 -0
- package/dist/types/sites/_internal/applyPermissionMigration.d.ts +7 -0
- package/package.json +1 -1
- package/dist/esm/core/PermissionManager.js +0 -60
- package/dist/esm/core/PermissionManager.js.map +0 -1
- package/dist/esm/core/types/IHubPermission.js +0 -1
- package/dist/esm/core/types/IHubPermission.js.map +0 -1
- package/dist/node/core/PermissionManager.js +0 -64
- package/dist/node/core/PermissionManager.js.map +0 -1
- package/dist/node/core/types/IHubPermission.js.map +0 -1
- package/dist/types/core/PermissionManager.d.ts +0 -43
- package/dist/types/core/types/IHubPermission.d.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type HubEntityType = "site" | "project" | "initiative" | "page";
|
|
@@ -15,7 +15,7 @@ export declare enum PublisherSource {
|
|
|
15
15
|
/**
|
|
16
16
|
* Data model for content
|
|
17
17
|
*/
|
|
18
|
-
export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion">, IHubContentEnrichments, IItem {
|
|
18
|
+
export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion" | "permissions">, IHubContentEnrichments, IItem {
|
|
19
19
|
/**
|
|
20
20
|
* The underlying portal item referenced by this content
|
|
21
21
|
*/
|
|
@@ -40,6 +40,7 @@ export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion">, IHub
|
|
|
40
40
|
identifier: string;
|
|
41
41
|
/**
|
|
42
42
|
* Content visibility and access control, including groups
|
|
43
|
+
* NOTE: this needs to be reconciled with Hub permission system
|
|
43
44
|
*/
|
|
44
45
|
permissions: {
|
|
45
46
|
/** Visibility of the content */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IHubEntityBase } from "./IHubEntityBase";
|
|
2
2
|
import { IHubGeography } from "../../types";
|
|
3
3
|
import { AccessLevel } from "./types";
|
|
4
|
-
import { IWithViewSettings } from "../traits";
|
|
4
|
+
import { IWithPermissions, IWithViewSettings } from "../traits";
|
|
5
5
|
/**
|
|
6
6
|
* Properties exposed by Entities that are backed by Items
|
|
7
7
|
*/
|
|
8
|
-
export interface IHubItemEntity extends IHubEntityBase {
|
|
8
|
+
export interface IHubItemEntity extends IHubEntityBase, IWithPermissions {
|
|
9
9
|
/**
|
|
10
10
|
* Access level of the item ("private" | "org" | "public")
|
|
11
11
|
*/
|
|
@@ -29,6 +29,11 @@ export interface IHubItemEntity extends IHubEntityBase {
|
|
|
29
29
|
* Extent of the Entity
|
|
30
30
|
*/
|
|
31
31
|
extent?: number[][];
|
|
32
|
+
/**
|
|
33
|
+
* Platform derived based on current user's access to the entity
|
|
34
|
+
* if defined, it means the user can edit the entity
|
|
35
|
+
*/
|
|
36
|
+
itemControl: string;
|
|
32
37
|
/**
|
|
33
38
|
* Username of the owner of the item
|
|
34
39
|
*/
|
|
@@ -62,4 +67,16 @@ export interface IHubItemEntity extends IHubEntityBase {
|
|
|
62
67
|
* Project display properties
|
|
63
68
|
*/
|
|
64
69
|
view?: IWithViewSettings;
|
|
70
|
+
/**
|
|
71
|
+
* Can current user edit the entity
|
|
72
|
+
* Derived from `item.itemControl` = "admin" | "update"
|
|
73
|
+
* @readonly
|
|
74
|
+
*/
|
|
75
|
+
canEdit: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Can current user delete the entity
|
|
78
|
+
* Derived from `item.itemControl` = "admin"
|
|
79
|
+
* @readonly
|
|
80
|
+
*/
|
|
81
|
+
canDelete: boolean;
|
|
65
82
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What is the status of a subsystem
|
|
3
|
+
*/
|
|
4
|
+
export declare type SystemStatus = "online" | "offline" | "maintenance" | "not-available";
|
|
5
|
+
/**
|
|
6
|
+
* Hash of subsystems and their status
|
|
7
|
+
*/
|
|
8
|
+
export declare type HubSystemStatus = {
|
|
9
|
+
[key in HubSubsystem]: SystemStatus;
|
|
10
|
+
};
|
|
11
|
+
declare const validSubsystems: readonly ["discussions", "events", "initiatives", "items", "metrics", "notifications", "pages", "projects", "search", "sites"];
|
|
12
|
+
/**
|
|
13
|
+
* Defines values for HubSubsystem
|
|
14
|
+
*/
|
|
15
|
+
export declare type HubSubsystem = typeof validSubsystems[number];
|
|
16
|
+
/**
|
|
17
|
+
* Validate a Subsystem
|
|
18
|
+
* @param subsystem
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSubsystem(maybeSubsystem: string): boolean;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./HubEntity";
|
|
2
|
+
export * from "./HubEntityType";
|
|
1
3
|
export * from "./IHubContent";
|
|
2
4
|
export * from "./IHubContentEnrichments";
|
|
3
5
|
export * from "./IHubEntityBase";
|
|
@@ -13,6 +15,5 @@ export * from "./IHubSiteTheme";
|
|
|
13
15
|
export * from "./IHubTimeline";
|
|
14
16
|
export * from "./IItemEnrichments";
|
|
15
17
|
export * from "./IServerEnrichments";
|
|
18
|
+
export * from "./ISystemStatus";
|
|
16
19
|
export * from "./types";
|
|
17
|
-
export * from "./IHubPermission";
|
|
18
|
-
export * from "../traits/IWithViewSettings";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior,
|
|
1
|
+
import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior } from "../core";
|
|
2
2
|
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -7,7 +7,6 @@ import { HubItemEntity } from "../core/HubItemEntity";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
|
|
9
9
|
private _catalog;
|
|
10
|
-
private _permissionManager;
|
|
11
10
|
/**
|
|
12
11
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
13
12
|
* more flexibility in how we create the HubInitiativeManager over time.
|
|
@@ -19,11 +18,6 @@ export declare class HubInitiative extends HubItemEntity<IHubInitiative> impleme
|
|
|
19
18
|
* @returns Catalog
|
|
20
19
|
*/
|
|
21
20
|
get catalog(): Catalog;
|
|
22
|
-
/**
|
|
23
|
-
* PermissionManager instance for this Initiative. Note: Do not hold direct references to this object; always access it from the Initiative.
|
|
24
|
-
* @returns PermissionManager
|
|
25
|
-
*/
|
|
26
|
-
get permissions(): PermissionManager;
|
|
27
21
|
/**
|
|
28
22
|
* Create an instance from an IHubInitiative object
|
|
29
23
|
* @param json - JSON object to create a HubInitiative from
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPermissionPolicy, Permission } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* All the permission policies for the Hub
|
|
4
|
+
*/
|
|
5
|
+
export declare const HubPermissionsPolicies: IPermissionPolicy[];
|
|
6
|
+
/**
|
|
7
|
+
* Get the policies defined for a specific permission
|
|
8
|
+
* @param permission
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function getPermissionPolicy(permission: Permission): IPermissionPolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate entityOwner policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkAlphaGating(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPolicyAssertion, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Check a specific EntityAssertion
|
|
5
|
+
* Exported purely for testing. Not exported from the package.
|
|
6
|
+
* @param assertion
|
|
7
|
+
* @param entity
|
|
8
|
+
* @param context
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkAssertion(assertion: IPolicyAssertion, entity: Record<string, any>, context: IArcGISContext): IPolicyCheck;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate entityOwner policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkAssertions(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate authentication policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkAuthentication(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate entityEdit policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkEdit(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPolicyCheck, IEntityPermissionPolicy } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate user meets entity policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkEntityPolicy(policy: IEntityPermissionPolicy, context: IArcGISContext): IPolicyCheck;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate license policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param response
|
|
7
|
+
* @param context
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkLicense(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate entityOwner policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkOwner(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate privilege policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkPrivileges(policy: IPermissionPolicy, context: IArcGISContext, entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
+
import { IAccessResponse, Permission } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Check a permission against the system policies, and possibly an entity policy
|
|
5
|
+
* @param permission
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkPermission(permission: Permission, context: IArcGISContext, entity?: Record<string, any>): IAccessResponse;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Permission } from "./Permission";
|
|
2
|
+
import { IPolicyCheck } from "./IPolicyCheck";
|
|
3
|
+
import { PolicyResponse } from "./PolicyResponse";
|
|
4
|
+
/**
|
|
5
|
+
* Response from a permission check
|
|
6
|
+
*/
|
|
7
|
+
export interface IAccessResponse {
|
|
8
|
+
/**
|
|
9
|
+
* Permission being checked
|
|
10
|
+
*/
|
|
11
|
+
permission: Permission;
|
|
12
|
+
/**
|
|
13
|
+
* Is the user allowed to perform the action
|
|
14
|
+
*/
|
|
15
|
+
access: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Code for the access response. Used for i18n and UX level messages
|
|
18
|
+
*/
|
|
19
|
+
code: string;
|
|
20
|
+
/**
|
|
21
|
+
* Reason for the access response
|
|
22
|
+
*/
|
|
23
|
+
response: PolicyResponse;
|
|
24
|
+
/**
|
|
25
|
+
* Message with details access response. Typically used to return additional
|
|
26
|
+
* information about assertion failures
|
|
27
|
+
*/
|
|
28
|
+
message?: string;
|
|
29
|
+
/**
|
|
30
|
+
* List of all the policies that were checked, and their responses
|
|
31
|
+
* For debugging / observability
|
|
32
|
+
*/
|
|
33
|
+
checks: IPolicyCheck[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Permission } from "./Permission";
|
|
2
|
+
/**
|
|
3
|
+
* Association of a Permission with a set of collaborators
|
|
4
|
+
*/
|
|
5
|
+
export interface IEntityPermissionPolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Permission being granted
|
|
8
|
+
*/
|
|
9
|
+
permission: Permission;
|
|
10
|
+
/**
|
|
11
|
+
* Type of the collaboration - org, group, group-admin or user
|
|
12
|
+
*/
|
|
13
|
+
collaborationType: CollaborationType;
|
|
14
|
+
/**
|
|
15
|
+
* Id of the collaboration set
|
|
16
|
+
*/
|
|
17
|
+
collaborationId: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type of collaboration set. Used when associating a permission with a set of collaborators
|
|
21
|
+
*/
|
|
22
|
+
export declare type CollaborationType = "user" | "group" | "group-admin" | "org" | "authenticated" | "anonymous";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HubLicense } from "./HubLicense";
|
|
2
|
+
import { HubSubsystem } from "../../core/types/ISystemStatus";
|
|
3
|
+
import { Permission } from "./Permission";
|
|
4
|
+
import { PlatformPrivilege } from "./PlatformPrivilege";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a system level policy for a specific permission.
|
|
7
|
+
* All conditions must be met for the permission to be granted. Additinonal conditions may be added by an entity to further
|
|
8
|
+
* limit access when the permission is checed in the contex to the entity.
|
|
9
|
+
* e.g. "hub:project:create" in the context of an Initiative, may further restrict to members of a specfic group
|
|
10
|
+
*/
|
|
11
|
+
export interface IPermissionPolicy {
|
|
12
|
+
/**
|
|
13
|
+
* Permission being defined
|
|
14
|
+
*/
|
|
15
|
+
permission: Permission;
|
|
16
|
+
/**
|
|
17
|
+
* What subsystems are required to be online for this permission to be granted
|
|
18
|
+
*/
|
|
19
|
+
subsystems: HubSubsystem[];
|
|
20
|
+
/**
|
|
21
|
+
* Must the user authenticated?
|
|
22
|
+
*/
|
|
23
|
+
authenticated?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* What licenses are required for this permission to be granted.
|
|
26
|
+
* This is checking the licese of the current user's org. It is not transitive to the entity being accessed.
|
|
27
|
+
* e.g. If a user is in a Partner "hub-basic" org, they can not create "premium" entities (e.g. Projects)
|
|
28
|
+
*/
|
|
29
|
+
licenses?: HubLicense[];
|
|
30
|
+
/**
|
|
31
|
+
* Any platform level privileges required for this permission to be granted
|
|
32
|
+
* e.g. "portal:user:createItem"
|
|
33
|
+
*/
|
|
34
|
+
privileges?: PlatformPrivilege[];
|
|
35
|
+
/**
|
|
36
|
+
* Is the user an owner of the entity being accessed?
|
|
37
|
+
*/
|
|
38
|
+
entityEdit?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Must the user be the owner of the entity being accessed?
|
|
41
|
+
*/
|
|
42
|
+
entityOwner?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Is this gated to alpha orgs?
|
|
45
|
+
*/
|
|
46
|
+
alpha?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* More complex policies can be defined with a set of assertions
|
|
49
|
+
*/
|
|
50
|
+
assertions?: IPolicyAssertion[];
|
|
51
|
+
}
|
|
52
|
+
export interface IPolicyAssertion {
|
|
53
|
+
property: string;
|
|
54
|
+
type: AssertionType;
|
|
55
|
+
value: any;
|
|
56
|
+
}
|
|
57
|
+
export declare type AssertionType = "eq" | "neq" | "gt" | "lt" | "contains" | "contains-all" | "without" | "included-in" | "is-group-admin" | "is-group-member" | "is-group-owner";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PolicyResponse } from "./PolicyResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Information about a specific policy check, and its response
|
|
4
|
+
* Used for debugging / observability
|
|
5
|
+
*/
|
|
6
|
+
export interface IPolicyCheck {
|
|
7
|
+
/**
|
|
8
|
+
* Description of the policy being checked
|
|
9
|
+
* e.g. License Required: "hub-premium"
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Value determined for the current user
|
|
14
|
+
* e.g. "hub-basic"
|
|
15
|
+
*/
|
|
16
|
+
value: string;
|
|
17
|
+
/**
|
|
18
|
+
* Policy Response code, for i18n
|
|
19
|
+
*/
|
|
20
|
+
code: string;
|
|
21
|
+
/**
|
|
22
|
+
* Policy Response string
|
|
23
|
+
*/
|
|
24
|
+
response: PolicyResponse;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the values for Permissions
|
|
3
|
+
* It's critical that the arrays defined in the modules use `as const`
|
|
4
|
+
* otherwise Permission devolves into just a string type
|
|
5
|
+
*/
|
|
6
|
+
declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view"];
|
|
7
|
+
/**
|
|
8
|
+
* Defines the possible values for Permissions
|
|
9
|
+
*/
|
|
10
|
+
export declare type Permission = typeof validPermissions[number];
|
|
11
|
+
/**
|
|
12
|
+
* Validate a Permission
|
|
13
|
+
* @param permission
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPermission(maybePermission: string): boolean;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type that defines Platform Privileges
|
|
3
|
+
* TODO: Ensure this is a complete list
|
|
4
|
+
*/
|
|
5
|
+
export declare type PlatformPrivilege = "opendata:user:designateGroup" | "opendata:user:openDataAdmin" | "portal:admin:assignToGroups" | "portal:admin:categorizeItems" | "portal:admin:changeUserRoles" | "portal:admin:createGPWebhook" | "portal:admin:createUpdateCapableGroup" | "portal:admin:deleteGroups" | "portal:admin:deleteItems" | "portal:admin:deleteUsers" | "portal:admin:disableUsers" | "portal:admin:inviteUsers" | "portal:admin:manageCollaborations" | "portal:admin:manageCredits" | "portal:admin:manageEnterpriseGroups" | "portal:admin:manageLicenses" | "portal:admin:manageRoles" | "portal:admin:manageSecurity" | "portal:admin:manageServers" | "portal:admin:manageUtilityServices" | "portal:admin:manageWebhooks" | "portal:admin:manageWebsite" | "portal:admin:reassignGroups" | "portal:admin:reassignItems" | "portal:admin:reassignUsers" | "portal:admin:shareToGroup" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateGroups" | "portal:admin:updateItemCategorySchema" | "portal:admin:updateItems" | "portal:admin:updateMemberCategorySchema" | "portal:admin:updateUsers" | "portal:admin:viewGroups" | "portal:admin:viewItems" | "portal:admin:viewUsers" | "portal:publisher:bulkPublishFromDataStores" | "portal:publisher:createFeatureWebhook" | "portal:publisher:publishBigDataAnalytics" | "portal:publisher:publishDynamicImagery" | "portal:publisher:publishFeatures" | "portal:publisher:publishFeeds" | "portal:publisher:publishKnowledgeGraph" | "portal:publisher:publishRealTimeAnalytics" | "portal:publisher:publishScenes" | "portal:publisher:publishServerGPServices" | "portal:publisher:publishServerServices" | "portal:publisher:publishTiledImagery" | "portal:publisher:publishTiles" | "portal:publisher:registerDataStores" | "portal:user:addExternalMembersToGroup" | "portal:user:categorizeItems" | "portal:user:createGroup" | "portal:user:createItem" | "portal:user:invitePartneredCollaborationMembers" | "portal:user:joinGroup" | "portal:user:joinNonOrgGroup" | "portal:user:reassignItems" | "portal:user:receiveItems" | "portal:user:runWebTool" | "portal:user:shareGroupToOrg" | "portal:user:shareGroupToPublic" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewHostedFeatureServices" | "portal:user:viewHostedTileServices" | "portal:user:viewOrgGroups" | "portal:user:viewOrgItems" | "portal:user:viewOrgUsers" | "portal:user:viewTracks";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**`
|
|
2
|
+
* Human readable response from a policy check
|
|
3
|
+
*/
|
|
4
|
+
export declare type PolicyResponse = "granted" | "org-member" | "not-org-member" | "group-member" | "not-group-member" | "not-group-admin" | "is-user" | "not-owner" | "not-licensed" | "not-licensed-available" | "not-available" | "not-granted" | "no-edit-access" | "edit-access" | "invalid-permission" | "privilege-required" | "system-offline" | "system-maintenance" | "entity-required" | "not-authenticated" | "not-alpha-org" | "property-missing" | "property-not-array" | "array-contains-invalid-value" | "array-missing-required-value" | "property-mismatch" | "user-not-group-member" | "user-not-group-manager" | "user-not-group-owner" | "assertion-property-not-found" | "assertion-failed" | "assertion-requires-numeric-values" | "property-match";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./HubLicense";
|
|
2
|
+
export * from "./IAccessResponse";
|
|
3
|
+
export * from "./IEntityPermissionPolicy";
|
|
4
|
+
export * from "./IPermissionPolicy";
|
|
5
|
+
export * from "./IPolicyCheck";
|
|
6
|
+
export * from "./Permission";
|
|
7
|
+
export * from "./PlatformPrivilege";
|
|
8
|
+
export * from "./PolicyResponse";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IEntityPermissionPolicy, Permission } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Add a policy to an array of entity policies
|
|
4
|
+
* Returns a new array
|
|
5
|
+
* @param permissions
|
|
6
|
+
* @param policy
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function addPermissionPolicy(permissions: IEntityPermissionPolicy[], policy: IEntityPermissionPolicy): IEntityPermissionPolicy[];
|
|
10
|
+
/**
|
|
11
|
+
* Remove a policy from an array of entity policies
|
|
12
|
+
* Returns a new array
|
|
13
|
+
* @param permissions
|
|
14
|
+
* @param permission
|
|
15
|
+
* @param id
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function removePermissionPolicy(permissions: IEntityPermissionPolicy[], permission: Permission, id: string): IEntityPermissionPolicy[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior,
|
|
1
|
+
import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions } from "../core";
|
|
2
2
|
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -8,7 +8,6 @@ import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBe
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
|
|
10
10
|
private _catalog;
|
|
11
|
-
private _permissionManager;
|
|
12
11
|
/**
|
|
13
12
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
14
13
|
* more flexibility in how we create the HubProjectManager over time.
|
|
@@ -20,11 +19,6 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
20
19
|
* @returns
|
|
21
20
|
*/
|
|
22
21
|
get catalog(): Catalog;
|
|
23
|
-
/**
|
|
24
|
-
* PermissionManager instance for this project. Note: Do not hold direct references to this object; always access it from the project.
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
get permissions(): PermissionManager;
|
|
28
22
|
/**
|
|
29
23
|
* Create an instance from an IHubProject object
|
|
30
24
|
* @param json - JSON object to create a HubProject from
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPermissionPolicy } from "../../permissions/types";
|
|
2
|
+
/**
|
|
3
|
+
* Project Permission Policies
|
|
4
|
+
* These define the requirements any user must meet to perform related actions
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view"];
|
|
8
|
+
export declare const ProjectPermissionPolicies: IPermissionPolicy[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubSite, IWithPermissionBehavior, IWithCatalogBehavior,
|
|
1
|
+
import { IHubSite, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior } from "../core";
|
|
2
2
|
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -9,7 +9,6 @@ import { IContainsResponse, IDeepCatalogInfo } from "../search";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class HubSite extends HubItemEntity<IHubSite> implements IWithStoreBehavior<IHubSite>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
|
|
11
11
|
private _catalog;
|
|
12
|
-
private _permissionManager;
|
|
13
12
|
private _catalogCache;
|
|
14
13
|
/**
|
|
15
14
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
@@ -22,11 +21,6 @@ export declare class HubSite extends HubItemEntity<IHubSite> implements IWithSto
|
|
|
22
21
|
* @returns
|
|
23
22
|
*/
|
|
24
23
|
get catalog(): Catalog;
|
|
25
|
-
/**
|
|
26
|
-
* PermissionManager instance for this site. Note: Do not hold direct references to this object; always access it from the site.
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
get permissions(): PermissionManager;
|
|
30
24
|
/**
|
|
31
25
|
* Create an instance from an IHubSite object
|
|
32
26
|
* @param json - JSON object to create a HubSite from
|
|
@@ -57,7 +57,7 @@ export declare function fetchSite(identifier: string, requestOptions: IHubReques
|
|
|
57
57
|
* @param requestOptions
|
|
58
58
|
* @returns
|
|
59
59
|
*/
|
|
60
|
-
export declare function convertModelToSite(model: IModel, requestOptions:
|
|
60
|
+
export declare function convertModelToSite(model: IModel, requestOptions: IRequestOptions): IHubSite;
|
|
61
61
|
/**
|
|
62
62
|
* Convert a Hub Site Application item into a Hub Site, fetching any
|
|
63
63
|
* additional information that may be required
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPermissionPolicy } from "../../permissions/types";
|
|
2
|
+
/**
|
|
3
|
+
* Site Permissions
|
|
4
|
+
* This feeds into the Permissions type
|
|
5
|
+
*/
|
|
6
|
+
export declare const SitePermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view"];
|
|
7
|
+
/**
|
|
8
|
+
* Site permission policies
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
export declare const SitesPermissionPolicies: IPermissionPolicy[];
|