@webiny/app-security-access-management 0.0.0-ee-vpcs.549378cf03
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/LICENSE +21 -0
- package/README.md +115 -0
- package/components/GroupAutocomplete/graphql.d.ts +1 -0
- package/components/GroupAutocomplete/graphql.js +17 -0
- package/components/GroupAutocomplete/graphql.js.map +1 -0
- package/components/GroupAutocomplete/index.d.ts +5 -0
- package/components/GroupAutocomplete/index.js +31 -0
- package/components/GroupAutocomplete/index.js.map +1 -0
- package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js +71 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
- package/components/NotAuthorizedError/SecureRouteError.svg +1 -0
- package/components/NotAuthorizedError/index.d.ts +1 -0
- package/components/NotAuthorizedError/index.js +13 -0
- package/components/NotAuthorizedError/index.js.map +1 -0
- package/index.d.ts +9 -0
- package/index.js +80 -0
- package/index.js.map +1 -0
- package/package.json +65 -0
- package/plugins/constants.d.ts +4 -0
- package/plugins/constants.js +13 -0
- package/plugins/constants.js.map +1 -0
- package/plugins/index.d.ts +3 -0
- package/plugins/index.js +20 -0
- package/plugins/index.js.map +1 -0
- package/plugins/installation.d.ts +3 -0
- package/plugins/installation.js +121 -0
- package/plugins/installation.js.map +1 -0
- package/plugins/permissionRenderer/SecurityPermissions.d.ts +8 -0
- package/plugins/permissionRenderer/SecurityPermissions.js +199 -0
- package/plugins/permissionRenderer/SecurityPermissions.js.map +1 -0
- package/plugins/permissionRenderer/index.d.ts +3 -0
- package/plugins/permissionRenderer/index.js +39 -0
- package/plugins/permissionRenderer/index.js.map +1 -0
- package/plugins/routes.d.ts +3 -0
- package/plugins/routes.js +56 -0
- package/plugins/routes.js.map +1 -0
- package/plugins/secureRouteError.d.ts +7 -0
- package/plugins/secureRouteError.js +22 -0
- package/plugins/secureRouteError.js.map +1 -0
- package/types.d.ts +15 -0
- package/types.js +5 -0
- package/types.js.map +1 -0
- package/ui/elements/GroupAutocompleteElement.d.ts +6 -0
- package/ui/elements/GroupAutocompleteElement.js +64 -0
- package/ui/elements/GroupAutocompleteElement.js.map +1 -0
- package/ui/views/ApiKeys/ApiKeyForm.d.ts +5 -0
- package/ui/views/ApiKeys/ApiKeyForm.js +288 -0
- package/ui/views/ApiKeys/ApiKeyForm.js.map +1 -0
- package/ui/views/ApiKeys/ApiKeys.d.ts +8 -0
- package/ui/views/ApiKeys/ApiKeys.js +26 -0
- package/ui/views/ApiKeys/ApiKeys.js.map +1 -0
- package/ui/views/ApiKeys/ApiKeysDataList.d.ts +5 -0
- package/ui/views/ApiKeys/ApiKeysDataList.js +232 -0
- package/ui/views/ApiKeys/ApiKeysDataList.js.map +1 -0
- package/ui/views/ApiKeys/graphql.d.ts +5 -0
- package/ui/views/ApiKeys/graphql.js +26 -0
- package/ui/views/ApiKeys/graphql.js.map +1 -0
- package/ui/views/ApiKeys/index.d.ts +1 -0
- package/ui/views/ApiKeys/index.js +18 -0
- package/ui/views/ApiKeys/index.js.map +1 -0
- package/ui/views/ApiKeys/utils.d.ts +2 -0
- package/ui/views/ApiKeys/utils.js +18 -0
- package/ui/views/ApiKeys/utils.js.map +1 -0
- package/ui/views/Groups/Groups.d.ts +8 -0
- package/ui/views/Groups/Groups.js +26 -0
- package/ui/views/Groups/Groups.js.map +1 -0
- package/ui/views/Groups/GroupsDataList.d.ts +5 -0
- package/ui/views/Groups/GroupsDataList.js +239 -0
- package/ui/views/Groups/GroupsDataList.js.map +1 -0
- package/ui/views/Groups/GroupsForm.d.ts +5 -0
- package/ui/views/Groups/GroupsForm.js +278 -0
- package/ui/views/Groups/GroupsForm.js.map +1 -0
- package/ui/views/Groups/graphql.d.ts +5 -0
- package/ui/views/Groups/graphql.js +26 -0
- package/ui/views/Groups/graphql.js.map +1 -0
- package/ui/views/Groups/index.d.ts +1 -0
- package/ui/views/Groups/index.js +18 -0
- package/ui/views/Groups/index.js.map +1 -0
- package/ui/views/utils.d.ts +3 -0
- package/ui/views/utils.js +26 -0
- package/ui/views/utils.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Webiny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @webiny/app-security
|
|
2
|
+
[](https://www.npmjs.com/package/@webiny/app-security)
|
|
3
|
+
[](https://www.npmjs.com/package/@webiny/app-security)
|
|
4
|
+
[](https://github.com/prettier/prettier)
|
|
5
|
+
[](http://makeapullrequest.com)
|
|
6
|
+
|
|
7
|
+
Exposes a simple `SecurityProvider` React provider component and enables you to quickly retrieve the currently signed-in user via the `useSecurity` React hook.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
```
|
|
11
|
+
npm install --save @webiny/app-security
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or if you prefer yarn:
|
|
15
|
+
```
|
|
16
|
+
yarn add @webiny/app-security
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Example
|
|
20
|
+
|
|
21
|
+
First, make sure you mount the `SecurityProvider` React provider component in your application's entrypoint component, for example the `App` component:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import React from "react";
|
|
25
|
+
import { Routes } from "@webiny/app/components/Routes";
|
|
26
|
+
import { BrowserRouter } from "@webiny/react-router";
|
|
27
|
+
import { SecurityProvider } from "@webiny/app-security";
|
|
28
|
+
import Authenticator from "./components/Authenticator";
|
|
29
|
+
|
|
30
|
+
export const App = () => (
|
|
31
|
+
<>
|
|
32
|
+
{/*
|
|
33
|
+
<SecurityProvider> is a generic provider of identity information. 3rd party identity providers (like Cognito,
|
|
34
|
+
Okta, Auth0) will handle the authentication, and set the information about the user into this provider,
|
|
35
|
+
so other parts of the system have a centralized place to fetch user information from.
|
|
36
|
+
*/}
|
|
37
|
+
<SecurityProvider>
|
|
38
|
+
{/* This is the component that might trigger the initial authentication
|
|
39
|
+
process and set the retrieved user data into the Security provider.*/}
|
|
40
|
+
<Authenticator>
|
|
41
|
+
<BrowserRouter basename={process.env.PUBLIC_URL}>
|
|
42
|
+
<Routes />
|
|
43
|
+
</BrowserRouter>
|
|
44
|
+
</Authenticator>
|
|
45
|
+
</SecurityProvider>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A simple `Authenticator` React component (uses Amazon Cognito and AWS Amplify's [`Auth`](https://github.com/aws-amplify/amplify-js/blob/main/packages/auth/src/Auth.ts#L100) class):
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import React, { useEffect } from "react";
|
|
54
|
+
import Auth from "@aws-amplify/auth";
|
|
55
|
+
import { useSecurity, SecurityIdentity } from "@webiny/app-security";
|
|
56
|
+
|
|
57
|
+
// Apart from the React component, we also configure the Auth class here.
|
|
58
|
+
Auth.configure({
|
|
59
|
+
region: process.env.REACT_APP_USER_POOL_REGION,
|
|
60
|
+
userPoolId: process.env.REACT_APP_USER_POOL_ID,
|
|
61
|
+
userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID,
|
|
62
|
+
oauth: {
|
|
63
|
+
domain: process.env.REACT_APP_USER_POOL_DOMAIN,
|
|
64
|
+
redirectSignIn: `${location.origin}?signIn`,
|
|
65
|
+
redirectSignOut: `${location.origin}?signOut`,
|
|
66
|
+
responseType: "token"
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// The `Authenticator` component.
|
|
71
|
+
const Authenticator: React.FC = props => {
|
|
72
|
+
const { setIdentity } = useSecurity();
|
|
73
|
+
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
// Get the currently signed-in user.
|
|
76
|
+
Auth.currentSession().then(response => {
|
|
77
|
+
const user = response.getIdToken().payload;
|
|
78
|
+
setIdentity(
|
|
79
|
+
new SecurityIdentity({
|
|
80
|
+
login: user.email,
|
|
81
|
+
firstName: user.given_name,
|
|
82
|
+
lastName: user.family_name,
|
|
83
|
+
logout: () => {
|
|
84
|
+
Auth.signOut();
|
|
85
|
+
setIdentity(null);
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
}).catch(() => { /* Do nothing. */ });
|
|
90
|
+
}, []);
|
|
91
|
+
|
|
92
|
+
return <>{props.children}</>;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default Authenticator;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Finally, use the `useSecurity` React hook in any of your components:
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
import React from "react";
|
|
102
|
+
import { useSecurity } from "@webiny/app-security";
|
|
103
|
+
|
|
104
|
+
const MyComponent: React.FC = () => {
|
|
105
|
+
const { identity } = useSecurity();
|
|
106
|
+
|
|
107
|
+
if (identity) {
|
|
108
|
+
return <>Logged in.</>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return <>Not logged in.</>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default MyComponent;
|
|
115
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LIST_GROUPS: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.LIST_GROUPS = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
|
|
13
|
+
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
16
|
+
var LIST_GROUPS = (0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n query listGroups {\n security {\n groups: listGroups {\n data {\n id\n slug\n name\n description\n createdOn\n }\n }\n }\n }\n"])));
|
|
17
|
+
exports.LIST_GROUPS = LIST_GROUPS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LIST_GROUPS","gql"],"sources":["graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\n\nexport const LIST_GROUPS = gql`\n query listGroups {\n security {\n groups: listGroups {\n data {\n id\n slug\n name\n description\n createdOn\n }\n }\n }\n }\n`;\n"],"mappings":";;;;;;;;;;;AAAA;;;;AAEO,IAAMA,WAAW,OAAGC,mBAAH,4XAAjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GroupAutocomplete = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _AutoComplete = require("@webiny/ui/AutoComplete");
|
|
13
|
+
|
|
14
|
+
var _graphql = require("./graphql");
|
|
15
|
+
|
|
16
|
+
var _reactHooks = require("@apollo/react-hooks");
|
|
17
|
+
|
|
18
|
+
var GroupAutocomplete = function GroupAutocomplete(props) {
|
|
19
|
+
var _useQuery = (0, _reactHooks.useQuery)(_graphql.LIST_GROUPS),
|
|
20
|
+
data = _useQuery.data,
|
|
21
|
+
loading = _useQuery.loading;
|
|
22
|
+
|
|
23
|
+
var options = loading || !data ? [] : data.security.groups.data;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_AutoComplete.AutoComplete, Object.assign({}, props, {
|
|
25
|
+
options: options,
|
|
26
|
+
valueProp: "id",
|
|
27
|
+
value: loading ? undefined : props.value
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.GroupAutocomplete = GroupAutocomplete;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GroupAutocomplete","props","useQuery","LIST_GROUPS","data","loading","options","security","groups","undefined","value"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { AutoComplete, AutoCompleteProps } from \"@webiny/ui/AutoComplete\";\nimport { LIST_GROUPS } from \"./graphql\";\nimport { useQuery } from \"@apollo/react-hooks\";\n\ntype GroupAutocompleteProps = Partial<AutoCompleteProps>;\nexport const GroupAutocomplete: React.FC<GroupAutocompleteProps> = props => {\n const { data, loading } = useQuery(LIST_GROUPS);\n\n const options = loading || !data ? [] : data.security.groups.data;\n\n return (\n <AutoComplete\n {...props}\n options={options}\n valueProp={\"id\"}\n value={loading ? undefined : props.value}\n />\n );\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAGO,IAAMA,iBAAmD,GAAG,SAAtDA,iBAAsD,CAAAC,KAAK,EAAI;EACxE,gBAA0B,IAAAC,oBAAA,EAASC,oBAAT,CAA1B;EAAA,IAAQC,IAAR,aAAQA,IAAR;EAAA,IAAcC,OAAd,aAAcA,OAAd;;EAEA,IAAMC,OAAO,GAAGD,OAAO,IAAI,CAACD,IAAZ,GAAmB,EAAnB,GAAwBA,IAAI,CAACG,QAAL,CAAcC,MAAd,CAAqBJ,IAA7D;EAEA,oBACI,6BAAC,0BAAD,oBACQH,KADR;IAEI,OAAO,EAAEK,OAFb;IAGI,SAAS,EAAE,IAHf;IAII,KAAK,EAAED,OAAO,GAAGI,SAAH,GAAeR,KAAK,CAACS;EAJvC,GADJ;AAQH,CAbM"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.NotAuthorizedError = void 0;
|
|
11
|
+
|
|
12
|
+
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _reactRouter = require("@webiny/react-router");
|
|
15
|
+
|
|
16
|
+
var _emotion = require("emotion");
|
|
17
|
+
|
|
18
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
19
|
+
|
|
20
|
+
var _reactHelmet = _interopRequireDefault(require("react-helmet"));
|
|
21
|
+
|
|
22
|
+
var _SecureRouteError = _interopRequireDefault(require("./SecureRouteError.svg"));
|
|
23
|
+
|
|
24
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
25
|
+
|
|
26
|
+
var ContentWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
27
|
+
target: "e18nns4o0",
|
|
28
|
+
label: "ContentWrapper"
|
|
29
|
+
})({
|
|
30
|
+
display: "block",
|
|
31
|
+
paddingTop: "15%",
|
|
32
|
+
textAlign: "center",
|
|
33
|
+
margin: "auto"
|
|
34
|
+
});
|
|
35
|
+
var styles = {
|
|
36
|
+
authErrorImgStyle: /*#__PURE__*/(0, _emotion.css)({
|
|
37
|
+
width: "192px",
|
|
38
|
+
paddingBottom: "24px"
|
|
39
|
+
}, "label:authErrorImgStyle;"),
|
|
40
|
+
bodyStyle: /*#__PURE__*/(0, _emotion.css)({
|
|
41
|
+
color: "var(--mdc-theme-text-primary-on-background)",
|
|
42
|
+
display: "block"
|
|
43
|
+
}, "label:bodyStyle;"),
|
|
44
|
+
linkStyle: /*#__PURE__*/(0, _emotion.css)({
|
|
45
|
+
textDecoration: "none",
|
|
46
|
+
"&:hover": {
|
|
47
|
+
textDecoration: "none"
|
|
48
|
+
}
|
|
49
|
+
}, "label:linkStyle;")
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var NotAuthorizedError = function NotAuthorizedError() {
|
|
53
|
+
return /*#__PURE__*/React.createElement(ContentWrapper, null, /*#__PURE__*/React.createElement(_reactHelmet.default, {
|
|
54
|
+
title: "Not authorized"
|
|
55
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
56
|
+
className: styles.authErrorImgStyle,
|
|
57
|
+
src: _SecureRouteError.default,
|
|
58
|
+
alt: "Not Authorized"
|
|
59
|
+
}), /*#__PURE__*/React.createElement(_Typography.Typography, {
|
|
60
|
+
use: "body1",
|
|
61
|
+
className: styles.bodyStyle
|
|
62
|
+
}, "You are not authorized to view this route."), /*#__PURE__*/React.createElement(_Typography.Typography, {
|
|
63
|
+
use: "body1",
|
|
64
|
+
className: styles.bodyStyle
|
|
65
|
+
}, "Please contact your administrator to request access."), /*#__PURE__*/React.createElement(_reactRouter.Link, {
|
|
66
|
+
to: "/",
|
|
67
|
+
className: styles.linkStyle
|
|
68
|
+
}, "Take me back."));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
exports.NotAuthorizedError = NotAuthorizedError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ContentWrapper","styled","display","paddingTop","textAlign","margin","styles","authErrorImgStyle","css","width","paddingBottom","bodyStyle","color","linkStyle","textDecoration","NotAuthorizedError","authErrorImg"],"sources":["NotAuthorizedError.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Link } from \"@webiny/react-router\";\nimport { css } from \"emotion\";\nimport styled from \"@emotion/styled\";\nimport Helmet from \"react-helmet\";\nimport authErrorImg from \"./SecureRouteError.svg\";\nimport { Typography } from \"@webiny/ui/Typography\";\n\nconst ContentWrapper = styled(\"div\")({\n display: \"block\",\n paddingTop: \"15%\",\n textAlign: \"center\",\n margin: \"auto\"\n});\n\nconst styles = {\n authErrorImgStyle: css({\n width: \"192px\",\n paddingBottom: \"24px\"\n }),\n bodyStyle: css({\n color: \"var(--mdc-theme-text-primary-on-background)\",\n display: \"block\"\n }),\n linkStyle: css({\n textDecoration: \"none\",\n \"&:hover\": {\n textDecoration: \"none\"\n }\n })\n};\n\nexport const NotAuthorizedError: React.FC = () => {\n return (\n <ContentWrapper>\n <Helmet title={\"Not authorized\"} />\n\n <img className={styles.authErrorImgStyle} src={authErrorImg} alt=\"Not Authorized\" />\n\n <Typography use={\"body1\"} className={styles.bodyStyle}>\n You are not authorized to view this route.\n </Typography>\n\n <Typography use={\"body1\"} className={styles.bodyStyle}>\n Please contact your administrator to request access.\n </Typography>\n\n <Link to=\"/\" className={styles.linkStyle}>\n Take me back.\n </Link>\n </ContentWrapper>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,cAAc,oBAAGC,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EACjCC,OAAO,EAAE,OADwB;EAEjCC,UAAU,EAAE,KAFqB;EAGjCC,SAAS,EAAE,QAHsB;EAIjCC,MAAM,EAAE;AAJyB,CAAjB,CAApB;AAOA,IAAMC,MAAM,GAAG;EACXC,iBAAiB,eAAE,IAAAC,YAAA,EAAI;IACnBC,KAAK,EAAE,OADY;IAEnBC,aAAa,EAAE;EAFI,CAAJ,6BADR;EAKXC,SAAS,eAAE,IAAAH,YAAA,EAAI;IACXI,KAAK,EAAE,6CADI;IAEXV,OAAO,EAAE;EAFE,CAAJ,qBALA;EASXW,SAAS,eAAE,IAAAL,YAAA,EAAI;IACXM,cAAc,EAAE,MADL;IAEX,WAAW;MACPA,cAAc,EAAE;IADT;EAFA,CAAJ;AATA,CAAf;;AAiBO,IAAMC,kBAA4B,GAAG,SAA/BA,kBAA+B,GAAM;EAC9C,oBACI,oBAAC,cAAD,qBACI,oBAAC,oBAAD;IAAQ,KAAK,EAAE;EAAf,EADJ,eAGI;IAAK,SAAS,EAAET,MAAM,CAACC,iBAAvB;IAA0C,GAAG,EAAES,yBAA/C;IAA6D,GAAG,EAAC;EAAjE,EAHJ,eAKI,oBAAC,sBAAD;IAAY,GAAG,EAAE,OAAjB;IAA0B,SAAS,EAAEV,MAAM,CAACK;EAA5C,gDALJ,eASI,oBAAC,sBAAD;IAAY,GAAG,EAAE,OAAjB;IAA0B,SAAS,EAAEL,MAAM,CAACK;EAA5C,0DATJ,eAaI,oBAAC,iBAAD;IAAM,EAAE,EAAC,GAAT;IAAa,SAAS,EAAEL,MAAM,CAACO;EAA/B,mBAbJ,CADJ;AAmBH,CApBM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="ffa0e257-4b46-4632-a8d6-93195cbf254d" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="895.68" height="517.48" viewBox="0 0 895.68 517.48"><defs><linearGradient id="74471b12-b6be-488b-b2aa-2815e91483d9" x1="790.94" y1="640.76" x2="790.94" y2="264.76" gradientTransform="translate(1229.99 -336.2) rotate(90)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="f5c756da-9879-448e-9194-9478f83d355f" x1="785.97" y1="446.14" x2="785.97" y2="321.91" gradientTransform="translate(1166.67 -399.94) rotate(90)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="5c9be04e-db0f-4829-87c1-2cfa193e30b8" x1="660.92" y1="518.19" x2="660.92" y2="494.17" gradientTransform="translate(1146.84 -172.9) rotate(90)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="b92f3a53-b4d2-4abd-916c-aeb632188996" x1="433.66" y1="605.23" x2="433.66" y2="235.23" gradientTransform="translate(13.58 8.51)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="44577794-7f8e-40ae-89fc-019e5bfac17e" x1="428.36" y1="413.71" x2="428.36" y2="291.46" gradientTransform="translate(-1.05 11.3)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="666bb7d3-84d0-4835-ad07-c313c2384f21" x1="295.22" y1="484.61" x2="295.22" y2="460.98" gradientTransform="translate(28.38 37.45)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="59939605-05af-4a9a-9980-f700897f3f8b" x1="455.07" y1="464.48" x2="455.07" y2="10.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="6c0ba2ee-2d81-48f4-b4cf-f21b525fcc13" x1="449.07" y1="229.48" x2="449.07" y2="79.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="45b0c09d-2995-447e-8cb2-7f6b59b5e20c" x1="298.07" y1="316.48" x2="298.07" y2="287.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="e5b0a96a-81f6-4370-afe3-5a7d6a35b55e" x1="457.07" y1="517.48" x2="457.07" y2="364.48" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="a1850e5a-cf77-4889-926a-0125112ab273" x1="611.23" y1="564.74" x2="611.23" y2="464.74" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/><linearGradient id="66998849-614e-4d8a-b9ff-f14bbc588ed8" x1="611.23" y1="660.74" x2="611.23" y2="602.74" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#74471b12-b6be-488b-b2aa-2815e91483d9"/></defs><title>safe</title><rect x="792.23" y="49.92" width="19.88" height="470.41" transform="translate(247.6 844.09) rotate(-81.36)" fill="#f5f5f5"/><rect x="589.23" y="209.59" width="376" height="490.29" transform="translate(58.72 963.57) rotate(-81.36)" fill="url(#74471b12-b6be-488b-b2aa-2815e91483d9)"/><rect x="603.48" y="229.23" width="342.87" height="470.41" transform="translate(47.16 969.52) rotate(-81.36)" fill="#f5f5f5"/><circle cx="580.99" cy="251.51" r="4.86" transform="translate(92.88 596.86) rotate(-81.36)" fill="#ff5252"/><circle cx="594.2" cy="253.52" r="4.86" transform="translate(102.12 611.62) rotate(-81.36)" fill="#ff0"/><circle cx="607.41" cy="255.53" r="4.86" transform="translate(111.36 626.39) rotate(-81.36)" fill="#69f0ae"/><rect x="720.53" y="174.84" width="124.23" height="422.38" transform="translate(131.25 910.54) rotate(-81.36)" fill="url(#f5c756da-9879-448e-9194-9478f83d355f)"/><rect x="576.36" y="328.95" width="413.27" height="115.12" transform="translate(-85.2 -304.51) rotate(8.64)" fill="#fa5a28"/><rect x="628.65" y="473.94" width="24.02" height="28.16" transform="translate(-90.24 856.82) rotate(-81.36)" fill="url(#5c9be04e-db0f-4829-87c1-2cfa193e30b8)"/><rect x="627.88" y="477.73" width="26.5" height="19.88" transform="translate(-71.61 -282.05) rotate(8.64)" fill="#fa5a28"/><rect x="622.77" y="511.3" width="26.5" height="19.88" transform="translate(-66.63 -280.9) rotate(8.64)" fill="#ff5252"/><rect x="617.67" y="544.87" width="26.5" height="19.88" transform="translate(-61.64 -279.75) rotate(8.64)" fill="#ff9800"/><rect x="696.41" y="506.51" width="213.67" height="11.59" transform="translate(-66.07 -306.13) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="691.31" y="540.08" width="213.67" height="11.59" transform="translate(-61.09 -304.98) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="686.21" y="573.65" width="213.67" height="11.59" transform="translate(-56.1 -303.83) rotate(8.64)" fill="#fa5a28" opacity="0.4"/><rect x="159.15" y="254.51" width="500.84" height="19.56" transform="translate(-199.95 -95.55) rotate(-12.6)" fill="#f5f5f5"/><rect x="186.23" y="243.74" width="522" height="370" transform="translate(-234.92 -83.38) rotate(-12.6)" fill="url(#b92f3a53-b4d2-4abd-916c-aeb632188996)"/><rect x="198.08" y="269.78" width="500.84" height="337.4" transform="translate(-237.01 -82.86) rotate(-12.6)" fill="#f5f5f5"/><ellipse cx="177.11" cy="316.25" rx="5.17" ry="4.78" transform="translate(-216.88 -145.01) rotate(-12.6)" fill="#ff5252"/><ellipse cx="191" cy="313.15" rx="5.17" ry="4.78" transform="translate(-215.87 -142.05) rotate(-12.6)" fill="#ff0"/><ellipse cx="204.88" cy="310.05" rx="5.17" ry="4.78" transform="translate(-214.86 -139.1) rotate(-12.6)" fill="#69f0ae"/><rect x="202.46" y="302.76" width="449.7" height="122.25" transform="translate(-221.25 -89.28) rotate(-12.6)" fill="url(#44577794-7f8e-40ae-89fc-019e5bfac17e)"/><rect x="207.83" y="307.54" width="440" height="113.28" transform="translate(-221.3 -89.16) rotate(-12.6)" fill="#fa5a28"/><rect x="308.61" y="498.42" width="29.98" height="23.63" transform="translate(-255.67 -108.38) rotate(-12.6)" fill="url(#666bb7d3-84d0-4835-ad07-c313c2384f21)"/><rect x="309.83" y="499.96" width="28.22" height="19.56" transform="matrix(0.98, -0.22, 0.22, 0.98, -255.56, -108.32)" fill="#fa5a28"/><rect x="317.12" y="532.57" width="28.22" height="19.56" transform="translate(-262.49 -105.94) rotate(-12.6)" fill="#ff5252"/><rect x="324.41" y="565.18" width="28.22" height="19.56" transform="matrix(0.98, -0.22, 0.22, 0.98, -269.43, -103.57)" fill="#ff9800"/><rect x="380.57" y="465.95" width="227.49" height="11.41" transform="translate(-243.14 -72.07) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="387.86" y="498.56" width="227.49" height="11.41" transform="translate(-250.08 -69.69) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="395.15" y="531.17" width="227.49" height="11.41" transform="translate(-257.02 -67.32) rotate(-12.6)" fill="#fa5a28" opacity="0.4"/><rect x="170.07" y="18.48" width="568" height="24" fill="#f5f5f5"/><rect x="159.07" y="10.48" width="592" height="454" fill="url(#59939605-05af-4a9a-9980-f700897f3f8b)"/><rect x="170.07" y="42.48" width="568" height="414" fill="#fff"/><circle cx="183.94" cy="30.48" r="5.87" fill="#ff5252"/><circle cx="200.07" cy="30.48" r="5.87" fill="#ff0"/><circle cx="216.2" cy="30.48" r="5.87" fill="#69f0ae"/><rect x="194.07" y="79.48" width="510" height="150" fill="url(#6c0ba2ee-2d81-48f4-b4cf-f21b525fcc13)"/><rect x="200.07" y="85.48" width="499" height="139" fill="#fa5a28"/><rect x="281.07" y="287.48" width="34" height="29" fill="url(#45b0c09d-2995-447e-8cb2-7f6b59b5e20c)"/><rect x="282.57" y="289.48" width="32" height="24" fill="#fa5a28"/><rect x="282.57" y="330.48" width="32" height="24" fill="#ff5252"/><rect x="282.57" y="371.48" width="32" height="24" fill="#ff9800"/><rect x="367.57" y="294.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="367.57" y="335.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="367.57" y="376.48" width="258" height="14" fill="#fa5a28" opacity="0.4"/><rect x="364.07" y="364.48" width="186" height="153" fill="url(#e5b0a96a-81f6-4370-afe3-5a7d6a35b55e)"/><path d="M559.15,531.41a52.08,52.08,0,0,1,104.17,0v33.33H677.9V531.41a66.67,66.67,0,1,0-133.33,0v33.33h14.58Z" transform="translate(-152.16 -191.26)" fill="url(#a1850e5a-cf77-4889-926a-0125112ab273)"/><path d="M561.23,530.74a50,50,0,0,1,100,0v32h14v-32a64,64,0,0,0-128,0v32h14Z" transform="translate(-152.16 -191.26)" fill="#fff"/><rect x="372.07" y="369.48" width="174" height="142" fill="#fa5a28"/><rect x="372.07" y="369.48" width="174" height="142" fill="#fff"/><rect x="372.07" y="397.48" width="174" height="86" fill="#fa5a28"/><path d="M624,615.5a12.76,12.76,0,1,0-22,8.74v27.22a9.28,9.28,0,0,0,18.56,0V624.24A12.7,12.7,0,0,0,624,615.5Z" transform="translate(-152.16 -191.26)" fill="url(#66998849-614e-4d8a-b9ff-f14bbc588ed8)"/><path d="M622.23,617.74a11,11,0,1,0-19,7.53v23.47a8,8,0,1,0,16,0V625.27A11,11,0,0,0,622.23,617.74Z" transform="translate(-152.16 -191.26)" opacity="0.2"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotAuthorizedError } from "./NotAuthorizedError";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "NotAuthorizedError", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _NotAuthorizedError.NotAuthorizedError;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _NotAuthorizedError = require("./NotAuthorizedError");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { NotAuthorizedError } from \"./NotAuthorizedError\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* TODO @ts-refactor
|
|
4
|
+
* Find out why is there empty default export
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: () => never[];
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const AccessManagementExtension: () => JSX.Element;
|
|
9
|
+
export declare const AccessManagement: React.MemoExoticComponent<() => JSX.Element>;
|
package/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = exports.AccessManagementExtension = exports.AccessManagement = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _plugins = require("@webiny/plugins");
|
|
15
|
+
|
|
16
|
+
var _appAdmin = require("@webiny/app-admin");
|
|
17
|
+
|
|
18
|
+
var _appSecurity = require("@webiny/app-security");
|
|
19
|
+
|
|
20
|
+
var _constants = require("./plugins/constants");
|
|
21
|
+
|
|
22
|
+
var _Groups = require("./ui/views/Groups");
|
|
23
|
+
|
|
24
|
+
var _ApiKeys = require("./ui/views/ApiKeys");
|
|
25
|
+
|
|
26
|
+
var _plugins2 = _interopRequireDefault(require("./plugins"));
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* TODO @ts-refactor
|
|
30
|
+
* Find out why is there empty default export
|
|
31
|
+
*/
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
var _default = function _default() {
|
|
34
|
+
return [];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.default = _default;
|
|
38
|
+
|
|
39
|
+
var AccessManagementExtension = function AccessManagementExtension() {
|
|
40
|
+
_plugins.plugins.register((0, _plugins2.default)());
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_appAdmin.Plugins, null, /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
43
|
+
name: _constants.Permission.Groups
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddRoute, {
|
|
45
|
+
exact: true,
|
|
46
|
+
path: "/access-management/groups"
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.Layout, {
|
|
48
|
+
title: "Access Management - Groups"
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_Groups.Groups, null)))), /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
50
|
+
name: _constants.Permission.ApiKeys
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddRoute, {
|
|
52
|
+
exact: true,
|
|
53
|
+
path: "/access-management/api-keys"
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.Layout, {
|
|
55
|
+
title: "Access Management - API Keys"
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_ApiKeys.ApiKeys, null)))), /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
57
|
+
any: [_constants.Permission.Groups, _constants.Permission.ApiKeys]
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
59
|
+
name: "settings"
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
61
|
+
name: "settings.accessManagement",
|
|
62
|
+
label: "Access Management"
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
64
|
+
name: _constants.Permission.Groups
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
66
|
+
name: "settings.accessManagement.groups",
|
|
67
|
+
label: "Groups",
|
|
68
|
+
path: "/access-management/groups"
|
|
69
|
+
})), /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
70
|
+
name: _constants.Permission.ApiKeys
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
72
|
+
name: "settings.accessManagement.apiKeys",
|
|
73
|
+
label: "API Keys",
|
|
74
|
+
path: "/access-management/api-keys"
|
|
75
|
+
}))))));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.AccessManagementExtension = AccessManagementExtension;
|
|
79
|
+
var AccessManagement = /*#__PURE__*/(0, _react.memo)(AccessManagementExtension);
|
|
80
|
+
exports.AccessManagement = AccessManagement;
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AccessManagementExtension","plugins","register","accessManagementPugins","Permission","Groups","ApiKeys","AccessManagement","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { memo } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Layout, Plugins, AddMenu, AddRoute } from \"@webiny/app-admin\";\nimport { HasPermission } from \"@webiny/app-security\";\nimport { Permission } from \"~/plugins/constants\";\nimport { Groups } from \"~/ui/views/Groups\";\nimport { ApiKeys } from \"~/ui/views/ApiKeys\";\nimport accessManagementPugins from \"./plugins\";\n\n/**\n * TODO @ts-refactor\n * Find out why is there empty default export\n */\n// @ts-ignore\nexport default () => [];\n\nexport const AccessManagementExtension = () => {\n plugins.register(accessManagementPugins());\n\n return (\n <Plugins>\n <HasPermission name={Permission.Groups}>\n <AddRoute exact path={\"/access-management/groups\"}>\n <Layout title={\"Access Management - Groups\"}>\n <Groups />\n </Layout>\n </AddRoute>\n </HasPermission>\n <HasPermission name={Permission.ApiKeys}>\n <AddRoute exact path={\"/access-management/api-keys\"}>\n <Layout title={\"Access Management - API Keys\"}>\n <ApiKeys />\n </Layout>\n </AddRoute>\n </HasPermission>\n <HasPermission any={[Permission.Groups, Permission.ApiKeys]}>\n <AddMenu name={\"settings\"}>\n <AddMenu name={\"settings.accessManagement\"} label={\"Access Management\"}>\n <HasPermission name={Permission.Groups}>\n <AddMenu\n name={\"settings.accessManagement.groups\"}\n label={\"Groups\"}\n path={\"/access-management/groups\"}\n />\n </HasPermission>\n <HasPermission name={Permission.ApiKeys}>\n <AddMenu\n name={\"settings.accessManagement.apiKeys\"}\n label={\"API Keys\"}\n path={\"/access-management/api-keys\"}\n />\n </HasPermission>\n </AddMenu>\n </AddMenu>\n </HasPermission>\n </Plugins>\n );\n};\n\nexport const AccessManagement = memo(AccessManagementExtension);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;AACA;AACA;AACA;AACA;eACe;EAAA,OAAM,EAAN;AAAA,C;;;;AAER,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,GAAM;EAC3CC,gBAAA,CAAQC,QAAR,CAAiB,IAAAC,iBAAA,GAAjB;;EAEA,oBACI,6BAAC,iBAAD,qBACI,6BAAC,0BAAD;IAAe,IAAI,EAAEC,qBAAA,CAAWC;EAAhC,gBACI,6BAAC,kBAAD;IAAU,KAAK,MAAf;IAAgB,IAAI,EAAE;EAAtB,gBACI,6BAAC,gBAAD;IAAQ,KAAK,EAAE;EAAf,gBACI,6BAAC,cAAD,OADJ,CADJ,CADJ,CADJ,eAQI,6BAAC,0BAAD;IAAe,IAAI,EAAED,qBAAA,CAAWE;EAAhC,gBACI,6BAAC,kBAAD;IAAU,KAAK,MAAf;IAAgB,IAAI,EAAE;EAAtB,gBACI,6BAAC,gBAAD;IAAQ,KAAK,EAAE;EAAf,gBACI,6BAAC,gBAAD,OADJ,CADJ,CADJ,CARJ,eAeI,6BAAC,0BAAD;IAAe,GAAG,EAAE,CAACF,qBAAA,CAAWC,MAAZ,EAAoBD,qBAAA,CAAWE,OAA/B;EAApB,gBACI,6BAAC,iBAAD;IAAS,IAAI,EAAE;EAAf,gBACI,6BAAC,iBAAD;IAAS,IAAI,EAAE,2BAAf;IAA4C,KAAK,EAAE;EAAnD,gBACI,6BAAC,0BAAD;IAAe,IAAI,EAAEF,qBAAA,CAAWC;EAAhC,gBACI,6BAAC,iBAAD;IACI,IAAI,EAAE,kCADV;IAEI,KAAK,EAAE,QAFX;IAGI,IAAI,EAAE;EAHV,EADJ,CADJ,eAQI,6BAAC,0BAAD;IAAe,IAAI,EAAED,qBAAA,CAAWE;EAAhC,gBACI,6BAAC,iBAAD;IACI,IAAI,EAAE,mCADV;IAEI,KAAK,EAAE,UAFX;IAGI,IAAI,EAAE;EAHV,EADJ,CARJ,CADJ,CADJ,CAfJ,CADJ;AAsCH,CAzCM;;;AA2CA,IAAMC,gBAAgB,gBAAG,IAAAC,WAAA,EAAKR,yBAAL,CAAzB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/app-security-access-management",
|
|
3
|
+
"version": "0.0.0-ee-vpcs.549378cf03",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
8
|
+
},
|
|
9
|
+
"contributors": [
|
|
10
|
+
"Pavel Denisjuk <pavel@webiny.com>",
|
|
11
|
+
"Sven Al Hamad <sven@webiny.com>",
|
|
12
|
+
"Adrian Smijulj <adrian@webiny.com>"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@apollo/react-hooks": "3.1.5",
|
|
17
|
+
"@emotion/styled": "10.3.0",
|
|
18
|
+
"@webiny/app": "0.0.0-ee-vpcs.549378cf03",
|
|
19
|
+
"@webiny/app-admin": "0.0.0-ee-vpcs.549378cf03",
|
|
20
|
+
"@webiny/app-security": "0.0.0-ee-vpcs.549378cf03",
|
|
21
|
+
"@webiny/form": "0.0.0-ee-vpcs.549378cf03",
|
|
22
|
+
"@webiny/plugins": "0.0.0-ee-vpcs.549378cf03",
|
|
23
|
+
"@webiny/react-router": "0.0.0-ee-vpcs.549378cf03",
|
|
24
|
+
"@webiny/ui": "0.0.0-ee-vpcs.549378cf03",
|
|
25
|
+
"@webiny/validation": "0.0.0-ee-vpcs.549378cf03",
|
|
26
|
+
"emotion": "10.0.27",
|
|
27
|
+
"graphql-tag": "2.12.6",
|
|
28
|
+
"lodash": "4.17.21",
|
|
29
|
+
"react": "17.0.2",
|
|
30
|
+
"react-dom": "17.0.2",
|
|
31
|
+
"react-helmet": "6.1.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@babel/cli": "^7.19.3",
|
|
35
|
+
"@babel/core": "^7.19.3",
|
|
36
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
37
|
+
"@babel/preset-env": "^7.19.4",
|
|
38
|
+
"@babel/preset-react": "^7.18.6",
|
|
39
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
40
|
+
"@types/react-helmet": "^6.1.5",
|
|
41
|
+
"@webiny/cli": "^0.0.0-ee-vpcs.549378cf03",
|
|
42
|
+
"@webiny/project-utils": "^0.0.0-ee-vpcs.549378cf03",
|
|
43
|
+
"babel-plugin-emotion": "^9.2.8",
|
|
44
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
45
|
+
"rimraf": "^3.0.2",
|
|
46
|
+
"ttypescript": "^1.5.12",
|
|
47
|
+
"typescript": "4.7.4"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"directory": "dist"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "yarn webiny run build",
|
|
55
|
+
"watch": "yarn webiny run watch"
|
|
56
|
+
},
|
|
57
|
+
"adio": {
|
|
58
|
+
"ignore": {
|
|
59
|
+
"peerDependencies": [
|
|
60
|
+
"react-dom"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"gitHead": "549378cf03fcd27845fc3fa23d1dc6b32896f630"
|
|
65
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Permission = void 0;
|
|
7
|
+
var Permission;
|
|
8
|
+
exports.Permission = Permission;
|
|
9
|
+
|
|
10
|
+
(function (Permission) {
|
|
11
|
+
Permission["Groups"] = "security.group";
|
|
12
|
+
Permission["ApiKeys"] = "security.apiKey";
|
|
13
|
+
})(Permission || (exports.Permission = Permission = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Permission"],"sources":["constants.ts"],"sourcesContent":["export enum Permission {\n Groups = \"security.group\",\n ApiKeys = \"security.apiKey\"\n}\n"],"mappings":";;;;;;IAAYA,U;;;WAAAA,U;EAAAA,U;EAAAA,U;GAAAA,U,0BAAAA,U"}
|
package/plugins/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _installation = _interopRequireDefault(require("./installation"));
|
|
11
|
+
|
|
12
|
+
var _permissionRenderer = _interopRequireDefault(require("./permissionRenderer"));
|
|
13
|
+
|
|
14
|
+
var _secureRouteError = _interopRequireDefault(require("./secureRouteError"));
|
|
15
|
+
|
|
16
|
+
var _default = function _default() {
|
|
17
|
+
return [_installation.default, _permissionRenderer.default, _secureRouteError.default];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["installation","permissionRenderer","secureRouteError"],"sources":["index.ts"],"sourcesContent":["import { PluginCollection } from \"@webiny/plugins/types\";\nimport installation from \"./installation\";\nimport permissionRenderer from \"./permissionRenderer\";\nimport secureRouteError from \"~/plugins/secureRouteError\";\n\nexport default (): PluginCollection => [installation, permissionRenderer, secureRouteError];\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;eAEe;EAAA,OAAwB,CAACA,qBAAD,EAAeC,2BAAf,EAAmCC,yBAAnC,CAAxB;AAAA,C"}
|