Commit graph

146 commits

Author SHA1 Message Date
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
Santosh Bhandari
417a46e7da
fix: Add line padding to invitation email (#1146) 2021-10-19 16:06:32 +05:30
Akshay
047ad1bfe7
fix equality checks and data query run guard (#1086) 2021-10-16 08:40:56 +05:30
Akshay
799bef0138
fix public app view and data query run (#1082) 2021-10-15 14:35:11 +05:30
Trevor Bayless
500b5831d2
Remove unnecessary constructor (#1071) 2021-10-15 10:39:36 +05:30
alammoiz
b23746084b
Refactoring: added missing return type (#1014) 2021-10-14 16:47:05 +05:30
Dainius Lukša
367617d678
Fixes smtp secure port settings (#1039) 2021-10-14 13:55:09 +05:30
Tulsi Prasad
e055de3ad1
Avoid using promises in places not designed to handle them (#1015)
Fix #1001
2021-10-13 22:04:37 +05:30
Akshay
e3ac378959
fix restapi query run with empty url (#991) 2021-10-12 19:34:37 +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
navaneeth
ee1e59dee5 Merge branch 'hotfix/fix-csp' into develop 2021-10-04 21:54:18 +05:30
navaneeth
f359c06d25 Disable insecure requests upgrade (CSP) 2021-10-04 21:52:44 +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
Akhil G Krishnan
88e08e50f9
BugFix: User Invitation URL in email is not clickable (#799) 2021-09-21 10:05:36 +05:30
Navaneeth Pk
35e1ee29dc
Eager load app versions (#786)
* Testing relations

* better fix

* Testing relations
2021-09-20 12:08:49 +05:30
Akshay
d166747276
add post health check endpoint (#768) 2021-09-16 21:45:33 +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
navaneeth
1e3d77004a Order queries on editor in alphabetical order 2021-09-13 09:37:18 +05:30
Arpit
04e7f8eaad
Fixes the path in query auth to run queries for public apps (#729) 2021-09-12 09:51:30 +05:30
Akshay
9d7b987e72
Fix csp headers to allow for google maps (#725) 2021-09-10 16:09:28 +05:30
Arpit
b0f0918571
Feature: Apps should only be edited by the admin or developer of the organisation. (#724)
* hide edit button for role:"user"

* probably one solution

* role=viewer cannot edit apps

* unused imports removed
2021-09-10 15:10:23 +05:30
Akshay
f4af291b6f
Chore: Application monitoring support with sentry (#702)
* setup sentry for server

* setup sentry for client

* update docs for sentry dns

* explicitly specify apm vendor

* add module for sentry

* revise directory struct and make sentry debuggable

* setup csp and trace headers for sentry

* whitelist csp for all sentry urls

* change senrty error sample rate to 50%

* make sentry send all errors from backend
2021-09-09 22:14:34 +05:30
Akshay
6bd08608ad
Feature: Client fetches public config from server (#713)
* add /api/config endpoint to serve public config

* client requests public config before app render

* update default public config for whitelist
2021-09-09 21:38:07 +05:30
Sherfin Shamsudeen
4306e47e36
Set request entity max limit to 50 megabytes (#697) 2021-09-06 21:28:02 +05:30
Akshay
7967e517be
Chore: Revise log setup (#687)
* ignore /health endpoints to be logged

* buffer logs till logs are flushed and throw exception on server exit
2021-09-06 20:08:09 +05:30
Akshay
24685a127f
fixes server error when inviting new user (#679) 2021-09-03 09:52:07 +05:30
navaneeth
12d8c4af28 Fix for REST API query previews returning 403 2021-08-30 23:36:05 +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
Akshay
e4bcf80af2
Application logger using pino (#600)
* setup application logger with pino

* remove console.log
2021-08-25 22:13:18 +05:30
Akshay
960bacd0c6
fixes pagination on home page (#589) 2021-08-24 11:14:16 +05:30
Sherfin Shamsudeen
1f0ff9ecf8
Add functionality to decide whether front-end should be served from server (#547)
* Add functionality to decide whether front-end should be served from server

This commit makes the server allow flag `--serve-frontend`, providing
which, will make the server serve the front-end at route '/'. Otherwise
it won't serve the front-end.

* Use env variable to enable serving client from a server end-point

* Add documentation for SERVE_CLIENT env var
2021-08-20 09:25:34 +05:30
Sherfin Shamsudeen
a53cac24b2
Feature: QR scanner widget (#519)
* Add QR code scanner widget

This commit adds QR code scanner widget which
  * Displays a viewfinder that can be activated or deactivated
  * Exposes a variable named lastDetectedValue which holds the
    data contained in the last QR code it was able to scan
  * Defines an event onDetect which is fired whenever a QR code
    is successfully scanned

* Add documentation for QR scanner widget

* Supply missing newline

* Supply missing newline for qrscanner.svg

* Supply missing newlines and semicolons

* Update error modal content

* Remove `active` property from QrScanner

* Add blob: to content security policy

* Disable content security policy

* Add content security policy that allows self, unsafe-eval and blob
2021-08-18 22:15:43 +05:30
Akshay
c92437b820
Fixes docker dev setup (#507)
* update docker-compose and docs for docker dev setup

* specify test environment explicitly on npm scripts

* fix migrations to be picked up from either root or dist folder

* fix default slug update
2021-08-13 10:13:22 +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
Sai Deepesh
595bd9b0b7
Fix for welcome email indentation (#505) 2021-08-12 21:02:14 +05:30
Akshay
283e8560ec
enable csp directives to allow script load when nest serves frontend (#495) 2021-08-11 19:26:20 +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
05073f45b8 Fix for 401 issue of public apps 2021-08-10 17:27:17 +05:30
navaneeth
7ab53cd456 Fix for versions not getting saved 2021-08-10 17:26:16 +05:30
navaneeth
9d09be4eae Fix for api query crashes 2021-08-10 15:48:37 +05:30
navaneeth
ae60c5897b Serialize app entities 2021-08-10 14:34:27 +05:30
navaneeth
2f39470ab0 Fix for queries not being serialized properly 2021-08-10 14:18:20 +05:30
navaneeth
ac77059ae8 Use semver to match installed and latest versions 2021-08-10 12:11:51 +05:30
Sherfin Shamsudeen
df225eeb4b
Send first name, last name and email as part of response to login (#481) 2021-08-09 17:40:44 +05:30
Sherfin Shamsudeen
f88411f01b
Feature: copy invitation link (#465)
* Send invitation tokens with the response to GET:organizations/users

* Add column in users table displaying 'copy invitation' button

This commit also makes the app generate corresponding invitation
URL and copies it to the clipboard.

* Add 'Copy invitation' button next to user's 'invited' status

This commit adds an icon button next to the 'invited' label
of users who are invited. Clicking on the button will copy the
corresponding invitation URL to clipboard, and will also
display a notification that says 'Invitation URL copied to clipboard'

* Remoce unnecessary import of Button

* Remove unnecessary empty line

* Remove unnecessary skeletal line

* Supply a newline at the end of theme.scss

* Show 'Copy invitation' button only for admins

* Send invitation token to front-end only if an admin is logged in

* Show 'copy invitation' button only if invitation token is available
2021-08-09 16:01:08 +05:30