Commit graph

144 commits

Author SHA1 Message Date
Muhsin Shah C P
dc8f69e4b2
[Feature] Organisation level environment variables 🚀 (#3068)
* Added new page for env vars

* Changed a field name

* Added some backend files
- Entity, Dto, services

* Started working with api endpoints
- implmented create
- added ability

* Added fields validation
- Added env variables into module

* Added update, delete, get apis
- Also implemented delete feature in frontend

* Implemented update operation on frontend
- Solved an api problem

* Added encryption

* Added encryption to update operation
- Exposed env vars to editor
- working on viewer

* Exposed env vars in viewer also
- Resolved a bug

* Updated edit & delete icon sizes

* Added specs
- Resolved issues that occurred while testing

* removed logout code

* Changed api endpoint

* splitted page into 3 different parts, Form & table

* Now, non-admin users can see all org env vars

* Resolved divider missing issue

* Added variable_type field

* Now secret server values will be shown as 'SecureValue'

* Now you can't update variable_type

* Now server will resolve the secret env values

* Resolved variable name issue

* Added unique constraints

* Resolved some frontend bugs

* Changed error text

* Fixed failing specs

* Added group permissions for org env vars

* Added permission checking in the backend

* Implemented permission checking in the frontend

* Edited spec for new changes

* Changed some specs and fixed failing specs

* Resolved failing case that showed up after merging with the latest develop

* Added default admin seed permissions

* Refactored some code

* Changed value to organization_id

* Fixed a bug

* Resolved a failing case

* Resolved PR changes
- Changed permission name
- Changed column type to enum
- Fixed some errors
- Refactored the code

* minor code change

* added scope

* Fixed: hide table when 0 no of vars available

* Fixed table dark theme issues

* Fixed encryption switch style

* Fixed failing cases and updated a spec

* Added %% for environment variables

* Added code to resolve single variable

* Fixed multi-variable usage

* resolved an issue

* removed extra divider

* Suggestions will also show up for %% too

* now, suggestions dropdown will only show env variables results

* env vars suggestions will not be included  in js search results

* You can't resolve env variables from js code
- Also, we can't resolve js code from env variable enclosures

* added an info text

* Resolved variables issue

* fixed Viewer issue

* Resolved a bug
- client variable was not working on query preview and run actions

* Update error message while using server variable on canvas

* Revert "Update error message while using server variable on canvas"

This reverts commit 081e1c9e29.

* Resolved all PR changes
- removed prefix 'environmentVariable'
- redefined variable evaluation
- removed environmentVariable object from inspector
- fixed a small bug

* Fixed a server side issue

Co-authored-by: Sherfin Shamsudeen <sherfin94@gmail.com>
2022-07-01 16:20:37 +05:30
Midhun G S
9a5dbacf9f
Password retry limit (#3300)
* password retry limit

* minor change in doc

* test cases

* fixes

* lint issue

* doc changes

Co-authored-by: Shubhendra <withshubh@gmail.com>
2022-06-30 00:49:45 +05:30
Muhsin Shah C P
cf5a37c56a
[bugfix] Now users can't create multiple versions with the same name for an app (#3342)
* Created a new migration file

* Added the migration

* added the failing error

* Fixed failing specs

* Working on PR changes
- error messages

* edited the migration

* added existed check

* Changed some variable names and error messages

* Resolved PR changes
- Typo
- Removed useless code
2022-06-28 12:36:28 +05:30
Midhun G S
100e51b57b
User account level security issue (#3272)
* user account level security issue

* review comments

* review comments
2022-06-17 17:09:13 +05:30
Muhsin Shah C P
2fdcfcc117
[Feature] Added ability to update and delete app folders (#3132)
* Added migration to add forder_delete column

* Added new group permission

* Added deleteFolder ability

* Added delete folder api

* Added menu icon

* Added new defualt permissions of admin

* Implemented folder menu and delete action

* Implemented update folder name in frontend

* Added folder name update feature

* Refactoring code

* Added specs for update and delete apis
- Updated test-helper function with new permissions

* Resolved failing specs

* corrected method name & add count checking to delete spec

* added organizationId scope

* Changed toast and modal texts

* Resolved a mistake

* Added a check box for update permission

* Now, an user can only delete folders, if he has the permission to view all apps

* Edited update and delete spec cases

* Added error toasts

* Refactored code

* Resolved PR changes
- Changed permission name in the frontend
- Refactored the code

* capitalized all toasts
- Changed error message

* Fixed new user permission issue

* Update a spec

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2022-06-16 19:41:38 +05:30
Midhun G S
b2be27c68c
Invited user should be able to login and activate account using SSO (#3164)
* SSO login flow changes

* changes

* Fix

* added more testcases

* testcase fixes

* changes

* documentations

* flow changes

* doc changes

* reviewed docs - user lifecycle and general settings

* Fixes

* docs changes

Co-authored-by: Shubhendra <withshubh@gmail.com>
2022-06-14 14:05:38 +05:30
gsmithun4
e5f4054c2b added env var to view-hide account setup link 2022-06-08 00:49:14 +05:30
Midhun G S
fadf025365
[BUG] Account level security issue (#3150)
* bug fixes

* changes

* changes for single workspace support

* added guards for signup route

* test cases fixes

* Workspace invite and user onboarding flow changes (#3190)

* invite user flow changes

* review comments

* cleanup

* testcase fix
2022-06-02 15:20:51 +05:30
Gandharv
5dbe795d73
feat: add user avatar (#2920)
* feat: add user avatar

* update: @nest/platform-express from 8.0.0 to 8.4.4

* add avatar_id in login response

* add user avatar upload in frontend

* align cross divider with layout icons'

* generate nest model - extensions

* cleanup

* fix tests

* reduce the avatar size on homepage

* fix review comments

* import Express

* add blob to csp
2022-06-02 12:19:49 +05:30
Akshay
fd89a0f242
Fix: Show sign up form for single organization when no org present (#3107)
* show sign up form for single organization when no org present

* update spec

* fix spec
2022-05-24 22:16:01 +05:30
Tanmoy Bhowmik
15c909abb2
Avoid creation of system group names (#2999)
* fix(group_permission): avoid useage of system defined user group

* test(group_permission): add test to verify the chaanges related to system group names

* fix(group_permission): change error message and fix reserved group list
2022-05-13 13:18:26 +05:30
Midhun G S
e656ea9259
Relabelling organization with workspace (#2992)
* Relabelling organization with workspace

* placeholder fix

* Bug fixes

* fix

* firefox issue fix
2022-05-11 16:30:25 +05:30
Tanmoy Bhowmik
e69ce71f4e
Fixes query order in query manager (#2967)
* fix(dataQueries): sort queries by createdAt

* test(dataQueries): add test to verify the queries are sorted

* test(dataQueries): sort queries in desc
2022-05-05 17:21:00 +05:30
Midhun G S
0545528504
Support for multiple workspaces 🚀 (#2778)
* multi org changes

* Initial changes

* changes

* manage sso page

* Multi-organization changes

* Multi organization changes

* multi-org changes

* multi-org changes

* multi-org changes

* multi-org fixes

* env variables app.json changes

* multi-org-fix

* user invitation token fix

* multi-org group permission fix

* multi-org app privilege

* google oauth fix

* Remove enable signup for form login

* Multi organization fixes

* multi-org user invite flow changes

* multi-org sign up fix

* rebase and multi-org fixes

* revert testing logs

* test logs revert

* migration changes

* migration file fix

* error message changes

* git login for private email fix

* dropdown fix

* test cases

* e2e test cases added

* test cases fix

* documentation changes

* testcases fix

* testcases added

* replace findOne with findOneOrFail

* accept invite testcases

* login page fixes

* added encrypted tag

* review comments

* migration fixes

* improvements

* manage sso loading fix

* review comments

* migration file changes

* new organization creation bug fix

* added e2e testcases

* added testcases

* Update data_sources.controller.ts
2022-05-05 12:38:42 +05:30
Ankush
a07b8e3439
Fixes addition of application to folder more than once (#2961)
* fixed addition of application to folder more than once

* Update server/src/services/folder_apps.service.ts

Co-authored-by: Midhun G S <gsmithun4@gmail.com>

Co-authored-by: Midhun G S <gsmithun4@gmail.com>
2022-05-05 12:04:42 +05:30
Tanmoy Bhowmik
ad223e701f
Fix invalid error message for user group (#2964)
* fix(groupPermission): add check for uniqueness before creating the group

* fix(groupPermission): add test for the uniqueness of group permission group name
2022-05-04 16:28:02 +05:30
Muhsin Shah C P
722a701b22
[Feature] option to delete a data source 🚀 (#2790)
* Implemented frontend
- icon and confirmation modal
- delete fn in services

* Implemented backend Endpoint
- Changed confirmation modal msg

* Added unit test for delete operation

* Changed the modal msg again

* Fixed delete btn alignment issue

* Resolved a bug

* changed popover width

* Now delete endpoint will only return the status

* Added a new spec to test delete a data-source from a specific version

* Added deleteDataSource ability

* Removed commented code

* Added BadRequestException in else case

* Resolved an error

* Changed confirmation modal
2022-05-02 18:42:14 +05:30
Akshay
971db32540
add backend validation to prevent editing released version (#2926) 2022-04-28 17:00:58 +05:30
Akshay
431dc961cd
Feature: Add data transfer object layer to validate and sanitize user inputs (#2694)
* add sanitize-html to be used with dto

* add dto for controllers

* add vaalidation to check token not empty

* update test config

* add validation pipe on test setup

* fix spec

* fix params casing

* update dto for empt checks

* update reset password dto

* only check for options to be defined

* update specs

* update dto and spec

* Remove invalid decorator

* update package-lock

* update thread dto

* update user dto

* fix email

* make comment req params attributes as optional

* fix specs
2022-04-20 14:46:57 +05:30
Akshay
841710aa9b
Fix: Version creation on empty/invalid version from id (#2510)
* fix version creation on empty/invalid version from id

* fix spec

* hotfix: Edited changes not shown when switching versions (#2386)

* fix edited changes not shown when switching versions

* fix version create from not picking editing version

* fix version switch not updated on editing version save
2022-03-15 15:12:43 +05:30
Akshay
8bfd814b3a
Feature: Version deletion (#2492)
* add ability to delete versions

* add specs for version delete

* add check for preventing released version deletion
2022-03-11 01:44:37 +05:30
Akshay
e81c7cdf93
fixes failing spec (#2425) 2022-03-03 22:05:19 +05:30
Maurits Lourens
93af7cedcb
Feature: Add remove from folder option to apps dashboard (#2333)
* Add remove from folder option to apps dashboard

* Add confirmation modal
2022-02-28 08:45:03 +05:30
Sherfin Shamsudeen
cba49a8813
Fix failing specs on oauth and templates (#2197) 2022-02-08 09:49:27 +05:30
Akshay Sasidharan
7c0ca61012 Merge branch 'main' into develop 2022-01-31 12:16:12 +05:30
Akshay
fa78963ec2
Fix: Folder and app scopes on homepage (#2004)
* fix folder scope on homepage

* bump up version
2022-01-31 11:15:44 +05:30
Midhun G S
486b8625c3
[BUG-1941] typeorm findone fix (#1973)
* BUG-1941 typeorm fineOne fix

* e2e test case failure
2022-01-28 11:44:44 +05:30
Midhun G S
5000f745b1
Github OAuth integration (#1837)
* Initial commit

* git auth

* git sso

* Git sso

* Git Oauth rebase

* review comments

* added email validation

* improvement

* Package lock revert

* E2E test case fix

* fix data population in migration

* Supress initial error thrown by google

* Fix

* e2e test cases

* added e2e test cases

* isValidDomain improvement

* e2e test cases fix

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2022-01-27 15:21:17 +05:30
Akshay
4f70e0b3f8
Fix: version find getting latest rec when not found (#1927)
* fixes version find getting latest rec when not found

* remove old spec

* fix e2e test
2022-01-25 13:09:50 +05:30
Akshay
56826c3183
Feature: Auto save editor and version management revamp (#1784)
* add modal to create init version

* add init version and ability to auto save

* auto save only when editing version is set

* Feature: App version management ui revamp (#1873)

* add modal to create init version

* add init version and ability to auto save

* auto save only when editing version is set

* revamp version switching on editor

* skip save on app definition load

* handle click outside dropdown

* fix remove component and update styling

* fix auto save detail

* change wording of deployed to released

* remove console.log

* add spec for version creation from another version

* update version create model and hide save detail after shown
2022-01-24 11:21:54 +05:30
Akshay Sasidharan
21a20bfd78 Merge branch 'main' into develop 2022-01-19 18:21:08 +05:30
Akshay
888a5d6bf1
Hotfix: oauth provider parse (#1867)
* fix oauth provider parse

* bump version

* fix failing spec
2022-01-19 18:19:21 +05:30
Gandharv
2f3b441c0a
Move plugins to root (#1728)
* feat: move plugins to root

* modify tsconfig

* add .gitignore

* delete old plugins file

* add parcel

* docker compose volume mount

* add gcs

* add typescript to plugins folder

* gcs to ts

* add dynamodb

* add elastic search

* add firestore

* add gsheets

* add graphql

* add mongodb

* mssql

* add mysql

* add postgresql

* add redis

* add s3

* add slack

* add stripe

* remove plugin related packages from pkgjson

* add lib folder

* add gitignore

* remove typescript generated files

* remove generated file

* remove generated files

* add twilio

* add dist to docker compose cache binding

* add dist prefix

* cleanup - 1

* delete dist

* rename to index.ts + add jest config

* add it.todo in tests

* test fixes

* test file changes

* fix type checks

* add @tooljet/plugins to server package json

* esm vs commonjs bug, reduce got to 11.8.2 from 12.0.0

* docker file npm package version fix

* add typesense

* cleaup - 2

* add sendgrid

* add lerna build and clean script for all packages + tsconfig

* cleanup -3

* add plugins build step

* add missing plugins build step in npm run build

* add mssql, mysql & postgres as singleton classes

* add db connection to cache only if datasourceId is available

* client: add data source schema/manifest files

* add query operations files

* logic for wrapping form with schema

* add script to create index file

* add @tooljet/plugins to frontend folder

* cleanup 1 -frontend

* cleanup - 2 // frontend // data queries

* add client and index to gitignore

* update gitignore

* fix lint & test

* update ci

* fix unit, e2e

* cleanup -3

* fix test

* fix tests

* fix indent

* try npm ci

* fix tests

* fix typo

* fix

* rename file for server entry

* heroku fix

* add main and types entry points in pkg json

* move common to root

* cleanup - 4: remove redundant $ sign prefix

* cleanup - 4: remove redundant $ sign prefix

* update options in-sync before DOM is painted

* change type cloud to cloud storage

* update readme

* update ci.yml

* update ci yml

* add pkg-lock.json

* rename index.ts to server.ts

* update lock files

* add server package.lock

* remove unused import

* revert commit: add minio

* add root dep

* import server.ts

* remove plugins build step

* add npm shrinkwrap

* update version - plugins

* add new version - 0.0.8

* upgrade version

* move to symlinked package

* add lock file

* feat: add icon inside package

* add plugin creation docs

* Remove seed

* move icons to plugins folder

* install pg dep

* add react to packages

* add seed cmd

* revert change

* add plugins build in lint, e2e, unit

* e2e, lint use npm ci

* update dockerfile for plugins

* try combining release with web

* limit memory on release

* try executing seed script post transpile

* try executing seed from server directory

* update seed execution

* add minio

* add correct type

* add minio to pkg json

* remove old file

* fix provider key

* add python installable + npm ^7.2.0 (#1752)

* add python installable + npm ^7.2.0

* add py to prod file

* pin npm version to 7.20.0

* pin npm version to 7.20.0

* split into multi stage build and remove python for buildx

* copy plugins from buider stage

* update dependencies

* add freetds dependency

* update server dockerfile

* update client dockerfile

* update dev dockerfile and compose file

* fix entrypoint

* fix server dev dockerfile

* update docker-compose

* remove npm install on root dir on docker build

* fix heroku script

* make lerna prod dependency to enable prod builds

* remove redundant env setup

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
Co-authored-by: navaneeth <navaneethpk@outlook.com>
2022-01-17 12:38:17 +05:30
Midhun G S
1e103ad4b7
[Home Page Design Changes] Update icon API (#1787)
* Feature-1786 Update Icon API

* Update Folders.jsx
2022-01-12 18:04:39 +05:30
Akshay
783ed2133c
Fix: Archived user cannot login or perform authenticated actions (#1749)
* archived user cannot login or perform authenticated actions

* fix spec

* invalidate invite token on archive
2022-01-07 14:46:23 +05:30
Akshay
51f3c2f9ab
Fix: check on removing last active admin (#1714)
* fix check on removing last active admin

* fix typo
2022-01-06 16:08:18 +05:30
Akshay
823833b12e
Feature: Versioning data sources & queries (#1620)
* add migrations for versioning datasources and dataqueries

* eslint migrations folder

* update ormconfig to use app context in migrations

* make app to make use versioned data sources and queries in editor

* app import should honor data source and query versioning

* register ts-node path on running migrations

* load data queries when finding versions

* update e2e tests

* handle for invalid oauth2 datasources

* update e2e tests

* introduce db migrations access lock to handle concurrent backfill

* scope migrations by missing version id

* fix import export without data source/query versions

* fix import

* fix spec

* handle invalid data on migration

* fix import

* remove console logs

* handle new app imports

* fix version check

* fix async creation

* explicitly add timestamps on version import
2022-01-04 13:34:12 +05:30
Akshay
e2dfbf038a
Feature: Unarchive users (#1694)
* add ability to unarchive users

* add e2e specs

* reset password on unarchive

* fix spec
2021-12-31 02:11:10 +05:30
Arpit
8a89bc8b71
[Feature] : SendGrid integration (Datasource API) (#1608)
* SendGrid integration

* unused logs

* unused logs

* update help text

* fixestypos for schema description

* fixestypos for schema description

* adding sendgrid docs

* updates logo from  Sendgrid's media kit

* sendgrid query schema updated

* fixes typos

* updates docs

* typos fix

* fix jest module transform

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2021-12-22 17:23:45 +05:30
Midhun G S
5bdd0fd6bf
Home Page Application search box (#1603)
* feature-1567 initial commit

* feature-1567

* freture-1567 App search box

* added default value for search key

* Loading fix

* Review comments

* Separated like query

* feature-1567 e2e testcases

* feature-1567 Fix

* feature-1567 fix

* feature-1567 fix
2021-12-22 14:37:37 +05:30
Sherfin Shamsudeen
7a79695af7
Feature/disable password login (#1585)
* Add option to disable login/signup via username/password

* Add documentation for disabling login via username/password
2021-12-15 22:53:07 +05:30
Akshay
b26a23176c
Chore: Update user e2e tests (#1556)
* Update tests

* remove console log

* remove explicit db connection close

* remove reload usage
2021-12-14 16:32:03 +05:30
Akshay
5b30aa2007
Chore: Setup pipeline (#1539)
* github actions for PR and push to develop branch

* test workflow

* move to workflows folder

* add setup node action

* modify build

* specify npm version

* config unit test

* specify host postgres

* specify container to run on

* add postgresql dependency

* add specify ws adapter for test

* add e2e test

* fix linting

* only log errors on tests

* update eslint config

* fix linting

* run e2e test in silent mode

* fix library app spec

* dont send email on test env

* fix org scope

* mock env vars

* remove reset modules

* force colors

* explicitly close db connection

* add eslint rule for floating promises

* update workflow

* fix floating promise

* fix lint

* update workflow

* run on all push and pulls

* update lint check files

* simplify workflow

* increase js heap size on env

* separate lint and build

Co-authored-by: arpitnath <arpitnath42@gmail.com>
2021-12-10 08:43:05 +05:30
Akshay
bf13cf5e1c
Feature: library apps with templates (#1529) 2021-12-07 18:55:41 +05:30
Akshay
260cde50ce
Fix: folder create permission (#1518)
* fix folder create permission

* scope migration
2021-12-07 00:37:19 +05:30
Akshay
67f297db9a
fix specs (#1460) 2021-11-25 18:16:39 +05:30
Sherfin Shamsudeen
598a46f76b
Fix failing oauth specs due to change in permissions (#1422) 2021-11-21 09:44:54 +05:30
Sherfin Shamsudeen
d88139d5b7
Feature/merge google sso to community edition (#1420)
* SSO 🔥 (#2)

* Add rough implementation of google SSO

* Use env variables for storing Google Oauth client id

* Set organization user to active when a new user is created via sso

This commit also fetches first name and last name from the payload
received from google.
Also adds some refactoring.

* Apply proper styles to google login button

* Refactor oauth controller

* Move google specific logic to a separate service

* Fail sign-in if google could not verify idToken

* Refactoring update for GoogleOAuthService

* Change env variable name for google sso client id

* Show Google sign-in button only if client id env variable is given

* Add SSO_GOOGLE_OAUTH2_CLIENT_ID to app.json

* Whitelist apis.google.com in CSP

* Add accounts.google.com to CSP

* Add documentation for Google SSO

* Add e2e tests for Google SSO

* Resolve minor linting issues

* Avoid use of raw query in migration for SSO ID

This commit also adds an index for SSO ID

* Verify domain of user's email id for single sign on

* Add documentation for RESTRICTED_DOMAIN env variable in SSO

* Move SSO controllers and services to ee folder

* Move GoogleLoginButton to ee folder

* Test the restricted domain verification for Google SSO

* Remove unnecessary console.log

* Apply better styles to Sign in with google button

* Remove documentation for Google SSO

This will be added to the community edition repo

* Remove unnecessary static images

* Fetch Google OAuth2 client id from server instead of client env (#3)

* Check for existing email when signing in via SSO (#4)

* hotfix oauth service return type

* hotfix sso user creation

* Allow disabling sign-up via SSO (#5)

* hotfix file input change on import/export

* Align SSO button on login box center (#6)

* Fix: group permission not being set on sso (#7)

* fixes group permission not being set on sso

* update specs for sso

* lint fix

* add user id on login response

* decamelize keys on login response

* fix specs

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
Co-authored-by: navaneeth <navaneethpk@outlook.com>
2021-11-17 16:51:50 +05:30
Akshay
a7f36f77f6
Chore: Revise and add specs for folders (#1391)
* revise and add specs for folders

* Feature: Folder create permission (#1394)

* add migration for folder create permission

* add backfill migration for folder create permission on admin group

* adds permission for folder creation

* refactor function

* select distinct folders
2021-11-15 11:43:48 +05:30
Gandharv
957241bdb8
Broadcast only to clients connected to a particular app id (#1384)
* websocket: broadcast only to clients connected to a particular app id

* fix: type error

* fix: broken test for comment
2021-11-08 12:45:18 +05:30
Gandharv
22bce1f4fb
Feature: Collaboration ( realtime comments for canvas ) 🔥 (#810)
* feat: initial commit for collaboration feature

* add dnd to comments

* add positions endpoint

* feat: encapsulate all http common logic in http-client

* segregate sections and transfer responsibility of state

* feat: use-spring to add fade effect 

* fix: open in right

* fix: left-right position css

* add footer for message

* integrate getcomment endpoint

* use fromnow for date ago

* add dnd

* - Add data trasfer object for comment
- Add class-validator package to check the response type from client
- Add comment repository class for persistance layer
- Add comment service with std. http methods
- Update controller with all http methods
- Update comment module
- Fix http-client bug when error is thrown

* fix http client bug when error is thrown

* feat: add entity thread

* feat: add migrations for thread and comment

* update entitites

* add tid to migration

* filter comments by tid(thread_id)

* fix: comment migration, add missing column comment

* feat: integrate in ui

* feat: split comments based on app_id

* fix: dnd to correct position

* package json engines

* engines update

* update npm

* npm 6 to 7

* fix: add user initials to thread

* fix: add firtname lastname to the comments

* - Return user object when save thread called
- Hide password field from user response
- Fix created_at date typo
- Instead of fetch all threads on new thread added, add the response to array of existing threads

* feat: update ui components

* change icon on comments view

* ui fixes

* fix: close icon close the popover

* temp: comment select: false

* use currentUser from localStorage

* fix: on click outside if comment is open, dont hit addThread

* fix: auth token issue in http-client

* on drag hide the comment if open

* add jwt auth

* spec: add test for comment & thread

* cleanup: remove console.log

* feat: add comment actions

* feat: add edit, delete, resolve options

* feat: add mentions component

* feat: add nestjs websockets

* temp

* websocket: establish client-server communication

* ws: add message listner to comments module in ui

* feat: add broadcast method to broadcast new events to all clients 💣

* ws: cleanup 🤙

* fix: remove max height from comment actions

* feat: add user mentions, emoji support

* fix: add static list of users - temp

* update and delete iterations

* - Rename comment, thread to comments, threads
- Add conditional actions
  - Show edit, delete only if he is comment owner
  - Show resolve only if he is thread owner

* reset engines

* move svgr webpack to deps

* fix: ui issues

* remove log stmt

* refactor: move resolved icon to comment-header

* feat: allow comments to be added on top of widgets

* feat: add keyboard shortcut

* scroll to bottom on comment add

* ui fixes

* feat: add react toast for notification display

* feat: add comment badge

* fix: ws connection

* fix: ws

* remove rvrse

* feat: add comment sidebar

* feat: add comment right sidebar

* fix: add missing foreign key elements

* - upgrade typeorm to 0.2.38
- comment sidebar ui
- added filter ui

* feat: on click of right sidebar notificaiton open the comment box

* reset engines

* fix: add organization id to the comment and thread module

* fix: add current version id

* add currentversion id

* disable comments if no id present

* temp:checking for heroku deploy

* fetch app on edit and deploy version

* rename current_version_id to app_versions_id

* ui fixes

* show mentioned user in blue color

* add ui changes

* add authorization for create thread

* change color to blue on click of comment, add auth for other endpoints of thread

* update threads, notifications using socket

* add auth for comments

* remove events spec file

* fix duplicate key error

* fix notificaitons updation on edit, delete, resolve buttons clicked

* update notifications for edit

* feature toggle changes for frontend

* add check for comments server

* add emoji mart package for emoji

* add reply count in comment sidebar

* subtract 1 from count in comment sidebar

* change empty text when no comments available
2021-11-01 12:58:03 +05:30
Akshay
a958b37cef
Feature: Group level permissions and related fixes (#1204)
* add column app_create to group_permissions table

* add app create column to group permission entity

* backfill app_create permission as true for admin group

* add app delete permissions to group permissions

* update group permissions entity for app delete

* add ability to set group level permission for app creation

* refactor and fix app clone and imports

* fix created by user on homepage

* fix spinner on import

* update seeds service to set group level permission

* fix rollback query

* fix imported/cloned app timestamps

* honor logged in user permissions at UI

* remove console log

* fix data query id being replaced on import

* replace data query id within app versions on import
2021-10-25 14:05:32 +05:30
Akshay
b0208c553a
Feature: Add ability to import and export apps (#1138)
* add ability to import and export apps

* copy credentials on imports if it already exists

* authorize exports for public apps with only authenticated users

* remove app auth guard for export

* make import as a separate button

* update import button styling

* handle prexisting slug while import

* set file input as null when file has been read

* add fix for slug updation on import
2021-10-19 16:52:00 +05:30
Akshay
799bef0138
fix public app view and data query run (#1082) 2021-10-15 14:35:11 +05:30
alammoiz
b23746084b
Refactoring: added missing return type (#1014) 2021-10-14 16:47:05 +05:30
Akshay
7023f72d1d
Feature: User access management 🔥 (#918)
* create migrations for group permissions setup

* define new entities and relationships

* revise migrations

* rename columns

* add migration to populate permission groups for existing users

* Feature: User access permission group usage (#883)

* create migrations for group permissions setup

* define new entities and relationships

* revise migrations

* rename columns

* add migration to populate permission groups for existing users

* revise migrations

* hide roles usage

* setup group permissions for apps and users

* fix defaultChecked

* fix update permission checkbox

* fix casl ability check to have params passed

* fix casl apps abilities to check with app specific permission

* add ability to delete groups

* conditionally render edit and delete options for all and admin users

* fix user role to group migration

* revise group management pages to disallow updating default group

* move manage users and groups to navbar dropdown

* show only addable apps and users on dropdowns

* rename header as profile settings

* scope addable apps and users by organization

* scope viewable apps on homepage

* hide manage groups link from non admins

* make permissions to be used with radio input

* add loading state for add apps/users buttons

* revise unit tests

* revise migrations

* fix e2e tests

* comment out dead code

* fix seeds script

* handle folder count

* captalize error toast

* hide manage users dropdown for non admins

* show fobidden error on blank homepage

* fix folder app count

* fix invalid state set

* make group name clickable for edit instead

* users with edit permission can deploy apps

* not show edit link on homepage if user dont have update permission

* remove unused entity from merge

* remove roles usage from manage org users page

* fix folder count and blank slate on homepage

* disable add buttons if there is no selections

* humanize default groups on view

* make app added onto groups have read permission by default

* not show app menu if user is not admin

* remove admin users from group user addition dropdown

* create default permissions for app cloned

* fix querying index page without page params

* fix admin scoped out from group add

* remove apps from header

* fix invitation url not shown

* scope admin deletion check by org

* scope public apps by organization

* add specs for group permissions e2e

* removed unused entity and add group permissions spec

* remove console logs

* remove unused permission

* scope public app count by org

* remove console log

* refactor manage group permission resources component

* update group permssion in org scope
2021-10-11 20:45:58 +05:30
Arpit
26c9cc655c
Fix linting errors across the app (#785)
* eslint-setup: rules for frontend and server

* setup pre-commit:hook

* frontend:eslint fixes

* frontend eslint errors and warning fixed

* eslint:fix for ./server

* fix server/test: expectatin string lint/error

* pre-commit:updated

* removed unwanted install cmd from docker file

* recommended settings and extension for vscode

* husky prepare script added

* updated extension recommendations

* added prettier as recommended extension

* added pre-commit to package.json

* remove .prettierrc file

* resolve changes

* resolve changes
2021-09-21 19:18:28 +05:30
Akshay
40005146c4
Fix role change when only one admin is present (#766) 2021-09-21 17:36:21 +05:30
Akshay
bc193c081f
Fix: Only update credentials when data source is updated (#763)
* only update credentials when data source is updated

* fix spec
2021-09-21 10:20:02 +05:30
Akshay
52cbec3d4c
Add ability to clone from existing apps (#743)
* add ability to clone from existing apps

* make use of clone ability to authorize clone requests

* refactor to use seperate service for cloning apps
2021-09-15 21:17:44 +05:30
Akshay
762773770c
Fixes app creation authorization (#757) 2021-09-15 21:12:04 +05:30
Akshay
f637a80fd6
Feature: data query deletion (#734)
* add feature for data query deletion

* fix after query deletion default query selection is not being done

* move delete option and hide option unless mouse is hovered on query

* show dialog box confirmation before query deletion
2021-09-13 22:54:47 +05:30
Akshay
24685a127f
fixes server error when inviting new user (#679) 2021-09-03 09:52:07 +05:30
Akshay
82f76e2799
Feature: app version preview & edit (#639)
* add ability to preview and edit versions

* add specs for get app versions

* create new app versions from prev definition

* fixes

* move default slug creation outside typeorm transaction

* set slug as app id when null

* fix app creation response

* fix entities not loading on test env

* add e2e test for version creation scenarios

Co-authored-by: navaneeth <navaneethpk@outlook.com>
2021-08-30 17:13:27 +05:30
Sherfin Shamsudeen
f4cb29ff69
Feature: Profile page for users (#501)
* Add endpoint to update user first and last name, password

* Add settings page that allows editing user details

* Respond with first and last name when user is updated

* Add 'Settings' item in the drop-down down for user

* Add newline for index.js of settings page

* Supply missing newlines

* Ask for current password inorder to change password

* Add end-point to change password

This commit also adds a Guard to ensure that the user reenters
existing valid password.

* Add e2e test for change_password endpoint

* Copy change for the toast presenting misentered current password while changing password

* Change password when enter key is pressed from 'new password' box

* Add newline and the end of password-revalidate.guard.ts
2021-08-12 21:03:52 +05:30
Sherfin Shamsudeen
5e266f9606
Delete 'AppUser's before App is deleted (#490)
* Delete 'AppUser's before App is deleted

This commit ensures that all the corresponding entries of AppUser
are deleted before an App is deleted. This is done so to prevent
pre-existing foreign keys from halting the deletion.

* Delete all One-To-Many associated entities when app is deleted

This commit makes the App service's delete action delete all the
related entities of types: FolderApps, DataSources, DataQueries,
AppUsers and AppVersions, before deleting the app itself.

* Set currentVersionId to null before deleting app
2021-08-11 15:36:28 +05:30
Sherfin Shamsudeen
54a40176ea
Feature: Ability to delete apps (#486)
* Add end-point that deletes an application

Deleting an application will also delete its corresponding
data sources, data queries and app versions.

* Add unit test for app deletion end-point

* Additional e2e test for delete app end-point

This test ensures that non-admin user cannot delete apps.
2021-08-10 19:36:37 +05:30
navaneeth
41dfad3651 Policies and tests for OAuth endpoint 2021-07-25 23:16:44 +05:30
navaneeth
a73b039114 Policies and tests for datasource endpoints 2021-07-25 00:14:44 +05:30
navaneeth
35388d8930 Policies and tests for query endpoints 2021-07-24 23:39:25 +05:30
navaneeth
fae1fa7272 Policies and tests for running queries 2021-07-24 11:43:21 +05:30
navaneeth
3c24d8a6c5 Endpoints for app viewer 2021-07-24 09:43:45 +05:30
navaneeth
59e0cd62c2 Endpoint for saving app versions 2021-07-23 22:27:59 +05:30
navaneeth
d5dda41c79 Endpoint to create app versions 2021-07-23 21:29:01 +05:30
navaneeth
70546845be Endpoint for fetching app versions 2021-07-23 20:21:24 +05:30
navaneeth
a003d24e97 Endpoint to create app users 2021-07-23 12:13:50 +05:30
navaneeth
41cca1e60c App users endpoint & e2e tests 2021-07-23 11:02:49 +05:30
navaneeth
540523c5ad Porting rails migrations to typeORM 2021-07-22 23:42:06 +05:30
navaneeth
63a3cf28c1 Tests for archiving users & changing roles 2021-07-22 20:08:34 +05:30
navaneeth
ad3e627b9c Endpoint for updating app params 2021-07-22 19:54:18 +05:30
navaneeth
cb56082f75 Test helpers for creating Nest instance & apps 2021-07-22 19:52:14 +05:30
navaneeth
c37289f1cd Policies and tests for org user invitation 2021-07-22 15:11:50 +05:30
navaneeth
ed1c026440 Test helper for creating orgs and users 2021-07-22 15:10:16 +05:30
navaneeth
6634bcfc3b Policies and tests for organization user actions 2021-07-22 12:55:29 +05:30
navaneeth
3aac8f03fb Helper for clearing DB before each test 2021-07-22 12:36:12 +05:30
navaneeth
b218dce44b E2e tests for archiving org users & changing roles 2021-07-20 16:55:51 +05:30
navaneeth
70ab290ffe Helper for e2e tests to generate auth header 2021-07-20 15:53:47 +05:30
navaneeth
e9b868cdc1 Tests for organization users page 2021-07-20 14:40:11 +05:30
navaneeth
f6745a178b Setup aliases for modules 2021-07-19 17:00:40 +05:30
navaneeth
f0ead25571 Endpoint: create datasource with encrypted credentials 2021-07-12 16:06:53 +05:30
navaneeth
c008dfc30e Hashing passwords using beforeInsert & beforeUpdate 2021-07-10 12:31:13 +05:30
navaneeth
1a6e53fcf1 Migration for users table 2021-07-09 14:35:56 +05:30
navaneeth
0e8c027131 E2E tests for login endpoint 2021-07-08 22:13:23 +05:30
navaneeth
b68c56a16e Initial commit for nestjs 2021-07-08 11:10:27 +05:30