Skip to content

Commit

Permalink
Merge pull request #107 from supertokens/feat/user-permissions
Browse files Browse the repository at this point in the history
feat: user permission on dashboard #3
  • Loading branch information
rishabhpoddar authored Sep 12, 2023
2 parents 5927db6 + a052474 commit 672340b
Show file tree
Hide file tree
Showing 21 changed files with 276 additions and 134 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.7.2] - 2023-09-11

- Enforces read, write permissions for allowed user on the user management dashboard.
- Changes an asset to match the rest of the site. (Credit: [karishmashuklaa](https://github.com/karishmashuklaa))

## [0.7.1] - 2023-08-03

- Fixed issues where DELETE request had header `"Content-Type": "application/json"`
Expand Down
10 changes: 7 additions & 3 deletions api_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ info:
version: 0.0.0
title: Dashboard Interface
description: Interface for dashboard and backend SDK to communicate with each other. All APIs must be prefixed by `{apiDomain}/{apiBasePath}`
note: "All the POST api's would give 403 status code back when user permissions are enabled."

tags:
- name: "User Authentication"
Expand Down Expand Up @@ -1203,15 +1204,18 @@ paths:
emailPassword:
type: object
properties:
enabled: boolean
enabled:
type: boolean
passwordless:
type: object
properties:
enabled: boolean
enabled:
type: boolean
thirdParty:
type: object
properties:
enabled: boolean
enabled:
type: boolean

servers:
# Added by API Auto Mocking Plugin
Expand Down
4 changes: 2 additions & 2 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"static/media/left-arrow-dark.svg": "/static/media/left-arrow-dark.svg",
"static/media/help-icon.png": "/static/media/help-icon.png",
"static/media/chevron-down.svg": "/static/media/chevron-down.svg",
"static/media/chevron-left.svg": "/static/media/chevron-left.svg",
"static/media/chevron-up-selected.svg": "/static/media/chevron-up-selected.svg",
"static/media/chevron-right.svg": "/static/media/chevron-right.svg",
"static/media/people.svg": "/static/media/people.svg",
"static/media/chevron-left.svg": "/static/media/chevron-left.svg",
"static/media/provider-facebook.svg": "/static/media/provider-facebook.svg",
"static/media/chevron-right.svg": "/static/media/chevron-right.svg",
"static/media/checkmark-yellow.svg": "/static/media/checkmark-yellow.svg",
"static/media/triangle-down.svg": "/static/media/triangle-down.svg",
"main.css.map": "/static/css/main.css.map",
Expand Down
2 changes: 1 addition & 1 deletion build/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/static/media/chevron-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions build/static/media/chevron-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 27 additions & 74 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard",
"version": "0.7.1",
"version": "0.7.2",
"private": true,
"dependencies": {
"@babel/core": "^7.16.0",
Expand Down
43 changes: 24 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ import "./images";
import SignOutBtn from "./ui/components/auth/SignOutBtn";
import AuthWrapper from "./ui/components/authWrapper";
import ErrorBoundary from "./ui/components/errorboundary";
import { AccessDeniedModal } from "./ui/components/layout/accessDeniedModal";
import { LayoutModalContainer } from "./ui/components/layout/layoutModal";
import SafeAreaView from "./ui/components/safeAreaView/SafeAreaView";
import { ToastNotificationContainer } from "./ui/components/toast/toastNotification";
import { AccessDeniedContextProvider } from "./ui/contexts/AccessDeniedContext";
import { PopupContentContextProvider } from "./ui/contexts/PopupContentContext";
import { TenantsListContextProvider } from "./ui/contexts/TenantsListContext";

Expand All @@ -34,25 +36,28 @@ function App() {
<SafeAreaView />
<ErrorBoundary>
<PopupContentContextProvider>
<TenantsListContextProvider>
<AuthWrapper>
<Router basename={getDashboardAppBasePath()}>
<SignOutBtn />
<Routes>
<Route
path="/"
element={<UsersListPage />}
/>
<Route
path="*"
element={<UsersListPage />}
/>
</Routes>
</Router>
<ToastNotificationContainer />
<LayoutModalContainer />
</AuthWrapper>
</TenantsListContextProvider>
<AccessDeniedContextProvider>
<TenantsListContextProvider>
<AuthWrapper>
<Router basename={getDashboardAppBasePath()}>
<SignOutBtn />
<Routes>
<Route
path="/"
element={<UsersListPage />}
/>
<Route
path="*"
element={<UsersListPage />}
/>
</Routes>
</Router>
<AccessDeniedModal />
<ToastNotificationContainer />
<LayoutModalContainer />
</AuthWrapper>
</TenantsListContextProvider>
</AccessDeniedContextProvider>
</PopupContentContextProvider>
</ErrorBoundary>
</>
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ export enum HTTPStatusCodes {
OK = 200,
BAD_REQUEST = 400,
UNAUTHORIZED = 401,
FORBIDDEN = 403,
NOT_FOUND = 404,
}
Loading

0 comments on commit 672340b

Please sign in to comment.