Skip to content

Commit

Permalink
Merge branch 'feat/userroles' of github.com:supertokens/dashboard int…
Browse files Browse the repository at this point in the history
…o feat/userroles-apispec
  • Loading branch information
Chakravarthy7102 committed Nov 23, 2023
2 parents d3cc14b + 8f67045 commit dc5ad97
Show file tree
Hide file tree
Showing 104 changed files with 4,578 additions and 94 deletions.
64 changes: 64 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,70 @@
- [ ] Android
- [ ] iOS (including iPadOS)

### Feature tests:

- [ ] Search
- [ ] Search with anything that results in an empty state in the UI (Should show an empty state explaining that there were no results)
- [ ] Search with an empty string (Dashboard should not allow this)
- [ ] Email search
- [ ] Serach for "e" with email tag and then delete the tag (Should show one user initially then show all with pagination enabled)
- [ ] Search for "test" with the email tag (Expect 14 results)
- [ ] Search with "g" for email tag (Expect 3 results)
- [ ] Search with "g" and "p" for email tag (Expect 3 results)
- [ ] Search with "g" and "t" for email tag, then delete "t" (Expect 17 results initially, then 3)
- [ ] Search with "@" for email tag (Expect 0 results (This is because at the time of adding this case we would only check for the start of the email or the domain and not any character inside the full email))
- [ ] Search for "passwordless+ABC@gmail.com" with email tag (Expect 1 result)
- [ ] Search for "debugging@supertokens.com" with email tag (Expect 3 results)
- [ ] Search for "gmail" with email tag (Expect 3 results)
- [ ] Search for "ABC" with email tag (Expect 0 results)
- [ ] Search for "a" with email tag (Expect 0 results (This is because at the time of adding this we only check if the email starts with the query and not contains))
- [ ] Search for "team" with email tag (Expect 0 results)
- [ ] Search for "782" with email tag (Expect 1 result)
- [ ] Phone search
- [ ] Search for "1" with phone tag (Expect 3 results)
- [ ] Search for "+1" with phone tag (Expect 3 results)
- [ ] Search for "91" with phone tag (Expect 1 result)
- [ ] Search for "291" with phone tag (Expect 0 results)
- [ ] Search for "+12" with phone tag (Expect 2 results)
- [ ] Search for "5" with phone tag (Expect 0 results)
- [ ] Search for "1(" with phone tag (Expect 0 results (This is because we render phone numbers with brackets so users may end up searching with that))
- [ ] Provider search
- [ ] Search for "g" with provider tag (Expect 5 results)
- [ ] Search for "gi" with provider tag (Expect 2 results)
- [ ] Search for "t" with provider tag (Expect 0 results)
- [ ] Search for "google" with provider tag (Expect 3 results)
- [ ] Combination testing
- [ ] Search with "g" for email tag and "g" for provider tag (Expect 1 result)
- [ ] Search for "github" with provider tag and "782" with email tag (Expect 1 result)
- [ ] Search for "github" and "google" with provider tag (Expect 5 results)
- [ ] Search for "j" and "g" with email tag (Expect 6 results)
- [ ] Search for "1" and "91" with phone tag (Expect 4 results)
- [ ] Search with "google" for provider tag and "1" for phone tag (Expect 0 results)
- [ ] Search for "g" with email tag and "1" with phone tag (Expect 0 results)
- [ ] Search for "k" with provider and "a", "g", "b" (in that order) for email (Expect 0 resutls)
- [ ] General UI testing
- [ ] Test that emty state renders fine (no overflow, no UI glitches, responsiveness etc)
- [ ] Test that the list renders fine (no overflow, no UI glitches, responsiveness etc)
- [ ] Test that pagination is visiable and usable (There should be at least 2 pages worth of users)
- [ ] Test that the list only shows 10 users at a time
- [ ] Test that for users with no accounts linked the auth method i nthe list is correct
- [ ] Test that for users with multiple login methods, the auth method shows correctly
- [ ] Test that search is visible if the feature is enabled
- [ ] Multi tenant testing
- [ ] Create one tenant (tenant1), and add 3 users to them. In the dashboard, when you switch to that tenant, it should list those users.
- [ ] Create a user in tenant1 and using backend sdk's(Go, Python, Node) associate the user to a different tenant and select that tenant on the dashboard from the tenants dropdown, it should show that user in the list
- [ ] User Roles and Permissions testing
- [ ] UserRoles page testing
- [ ] Test the empty state when there are no roles created on the roles page.
- [ ] Test creation, delete and updating functionality of the roles are working properly.
- [ ] Test pagination of the roles list with more than 2 or 3 pages of data atleast.
- [ ] Test that the permissions per role are rendering properly without overflowing the parent table.
- [ ] Check for the `feature_not_enabled` state on both userDetails page and user roles page.
- [ ] userDetails page testing with respect to roles and permissions.
- [ ] Test adding and deleting roles to a user.
- [ ] Test the roles search feature and make sure that the list does not include any assigned roles in it.
- [ ] Test by associating the user with multiple tenants and assigning roles to the user in each tenant separately.

## Documentation changes

(If relevant, please create a PR in our [docs repo](https://github.com/supertokens/docs), or create a checklist here highlighting the necessary changes)
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.9.0] - 2023-11-17

- Adds user roles and permissions feature to dashboard.

## [0.8.6] - 2023-11-15

- Adds click action to the entire user row.

## [0.8.5] - 2023-10-5

- Fixes showing email verification UI even though it's not initialised.
Expand Down
13 changes: 13 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
"static/media/favicon.ico": "/static/media/favicon.ico",
"static/media/ST_icon_light_theme.svg": "/static/media/ST_icon_light_theme.svg",
"static/media/ST_full_logo_dark_theme.svg": "/static/media/ST_full_logo_dark_theme.svg",
"static/media/secuity-key.svg": "/static/media/secuity-key.svg",
"static/media/refresh.svg": "/static/media/refresh.svg",
"static/media/ST_full_logo_light_theme.svg": "/static/media/ST_full_logo_light_theme.svg",
"static/media/ST_icon_dark_theme.svg": "/static/media/ST_icon_dark_theme.svg",
"static/media/auth-method.svg": "/static/media/auth-method.svg",
"static/media/logo.svg": "/static/media/logo.svg",
"static/media/plus-square.svg": "/static/media/plus-square.svg",
"static/media/roles-and-permissions.svg": "/static/media/roles-and-permissions.svg",
"static/media/no-results.svg": "/static/media/no-results.svg",
"static/media/email.svg": "/static/media/email.svg",
"static/media/user-managment.svg": "/static/media/user-managment.svg",
"static/media/lock.svg": "/static/media/lock.svg",
"static/media/checkmark-green.svg": "/static/media/checkmark-green.svg",
"static/media/plus.svg": "/static/media/plus.svg",
"static/media/green-check.svg": "/static/media/green-check.svg",
"static/media/clear.svg": "/static/media/clear.svg",
"static/media/provider-apple.svg": "/static/media/provider-apple.svg",
"static/media/search.png": "/static/media/search.png",
Expand All @@ -37,6 +45,7 @@
"static/media/trash-opened.svg": "/static/media/trash-opened.svg",
"static/media/checkmark.svg": "/static/media/checkmark.svg",
"index.html": "/index.html",
"static/media/loader.svg": "/static/media/loader.svg",
"static/media/star_sparkle.svg": "/static/media/star_sparkle.svg",
"static/media/close.svg": "/static/media/close.svg",
"static/media/copy.svg": "/static/media/copy.svg",
Expand All @@ -53,10 +62,14 @@
"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/arrow-down.svg": "/static/media/arrow-down.svg",
"static/media/hamburger-menu.svg": "/static/media/hamburger-menu.svg",
"static/media/provider-facebook.svg": "/static/media/provider-facebook.svg",
"static/media/Union-yellow.png": "/static/media/Union-yellow.png",
"static/media/Union.png": "/static/media/Union.png",
"static/media/checkmark-yellow.svg": "/static/media/checkmark-yellow.svg",
"static/media/spinner.svg": "/static/media/spinner.svg",
"static/media/cross.svg": "/static/media/cross.svg",
"static/media/triangle-down.svg": "/static/media/triangle-down.svg",
"main.css.map": "/static/css/main.css.map",
"bundle.js.map": "/static/js/bundle.js.map",
Expand Down
4 changes: 2 additions & 2 deletions 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.

11 changes: 11 additions & 0 deletions build/static/js/bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ object-assign
* LICENSE file in the root directory of this source tree.
*/

/**
* React Router DOM v6.3.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router v6.3.0
*
Expand Down
2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions build/static/media/arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/green-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions build/static/media/hamburger-menu.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: 4 additions & 0 deletions build/static/media/loader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/no-results.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/plus-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dc5ad97

Please sign in to comment.