1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00
Commit graph

250 commits

Author SHA1 Message Date
mike12345567 76e24018be Merge branch 'develop' of github.com:Budibase/budibase into lab-day/refactor-app-db 2022-01-31 14:09:07 +00:00
Rory Powell a153e920c9 Merge branch 'develop' into feature/migrations-2.0 2022-01-30 22:37:11 +00:00
Rory Powell 3ce4f32250 Merge branch 'develop' into csrf 2022-01-30 21:20:48 +00:00
mike12345567 4b1331450c Fixing some issues discovered by the cypress tests, cleaning up how Couch is used. 2022-01-28 18:52:34 +00:00
mike12345567 417bf98ec9 Tests updating, all now passing, fixed some issues discovered by them. 2022-01-28 15:43:51 +00:00
Michael Drury 91c2a40c89 Final pass refactoring - need to test but all code in server converted. 2022-01-28 00:05:39 +00:00
mike12345567 40c6eb2007 Main body of work, refactoring most usages. 2022-01-27 18:18:31 +00:00
Rory Powell 420684a862 Merge branch 'develop' into feature/migrations-2.0 2022-01-26 15:00:52 +00:00
Rory Powell 716e254bdd Revert "Fix dev app preview return url"
This reverts commit e76ea10fc2.
2022-01-26 09:33:14 +00:00
Rory Powell 5cb6e19274 Add CSRF Token 2022-01-25 22:54:50 +00:00
Rory Powell a66f14a289 Migrations 2.0 2022-01-24 10:48:59 +00:00
Rory Powell 5246296a39
Merge pull request #4000 from Budibase/fix/sync-apps-reset-rows-quotas
App and Row Quota Fixes
2022-01-21 11:20:14 +00:00
Rory Powell 94cb39829c Support template and app import in quotas + logging 2022-01-18 15:37:16 +00:00
Rory Powell 747db3daa2 Refactor to allow for future quota migrations 2022-01-18 14:43:24 +00:00
Rory Powell a09bbfb492 Account for duplicate row ids caused by app import 2022-01-18 12:48:54 +00:00
Rory Powell 3520c3d42b Sync row usage with app deletion 2022-01-17 18:07:26 +00:00
Rory Powell 66a84e8fe6 Calculate total rows in migration, centralise quota enabled logic and tidy to use env vars only 2022-01-17 12:44:53 +00:00
Rory Powell e76ea10fc2 Fix dev app preview return url 2022-01-13 16:29:55 +00:00
mike12345567 d89cf66343 Merge branch 'develop' of github.com:Budibase/budibase into fix/sync-apps-reset-rows-quotas 2022-01-12 13:20:22 +00:00
mike12345567 6817d6cf46 Fixing test mocking. 2022-01-12 11:50:14 +00:00
mike12345567 5d9b3af332 Refactoring core library usage in monorepo, make it a bit cleaner/easier to search/more standardised. 2022-01-12 11:32:14 +00:00
Rory Powell 5671244274 Merge branch 'develop' into fix/sync-apps-reset-rows-quotas 2022-01-12 09:34:14 +00:00
Rory Powell 870bd6e898 Add local dev override for quotas 2022-01-11 18:47:42 +00:00
Rory Powell 76463bc368 Enable migration 2022-01-11 18:38:18 +00:00
Rory Powell ea82983ebd Sync app quota to correct number, reset and disable rows quota 2022-01-11 17:49:42 +00:00
mike12345567 836a2f5863 Switching out @budibase/auth to @budibase/backend-core. 2022-01-10 19:33:00 +00:00
Andrew Kingston 29c5e6c243 Add devtools to app preview and add ability to preview apps as different roles 2021-11-26 13:25:02 +00:00
mike12345567 831ef53319 Merge branch 'master' of github.com:Budibase/budibase into develop 2021-11-25 12:21:58 +00:00
mike12345567 3b9f3d6690 Fix for cypress test issues, when metadata is updated rapidly it could get into a bad state - this should resolve it. 2021-11-16 20:56:24 +00:00
mike12345567 7eb29ffc7d Updating the getAllApps function to use a cached version of the app metadata, rather than retrieving it individually everytime. Also invalidating the results everytime they are updated (at least in the important locations). 2021-11-15 17:40:45 +00:00
mike12345567 624ab3648c Fixing issue where database wasn't accessible in authorized test. 2021-11-15 15:57:02 +00:00
mike12345567 e0f04abfb1 Updating to allow a list of roles to be retrieved, allowing resources to have multiple levels of role that they can be accessed via. 2021-11-15 15:26:09 +00:00
mike12345567 4268ad6f80 Fixing an issue discovered in #3385 - RBAC roles worked for applying lower levels of roles, but they didn't revoke access correctly, it would always fallback to the base permissions if higher permissions were set. 2021-11-15 13:48:26 +00:00
mike12345567 a0ebe7537d Merge branch 'develop' of github.com:Budibase/budibase into fix/user-metadata 2021-11-08 17:28:32 +00:00
mike12345567 ab38258654 Updating usage quota middleware to fix issue presented in #3258 where anything with an _id and a _rev is considered to exist in CouchDB, which won't always be the case. Handle the scenario of an external database ID and don't error. 2021-11-05 14:59:28 +00:00
mike12345567 9aa708588a Adding the sync call from the worker for creation, updating and deletion of users. Making sure that production and development apps are always up to date with user metadata. 2021-11-04 14:53:03 +00:00
mike12345567 9ce1866fab Fixing an issue with webhooks, couldn't use them in development (like getting schema) and making sure trigger will always use production app #3143. 2021-11-03 14:08:47 +00:00
Rory Powell b8c10c9e9f Linting 2021-10-26 09:42:19 +01:00
Rory Powell 0718f99850 Prevent non builder from accessing dev apps 2021-10-25 16:59:09 +01:00
Rory Powell fc81644255 Fix unit tests 2021-10-12 14:03:47 +01:00
Rory Powell 0d76f5ce22 No access role / public by default 2021-10-12 10:05:57 +01:00
mike12345567 380d0e030e Fixing issue with user's being logged in and trying to access other tenants public apps, this work makes sure that users from other tenants will not be 403'd immediately (too aggressive) but instead they will have all other their RBAC roles revoked. 2021-10-07 15:49:26 +01:00
mike12345567 be5f3a84ca Fixing minor mistake. 2021-10-07 08:33:39 +01:00
Martin McKeaveney 191299697b prevent cross tenant app access 2021-10-06 22:16:50 +01:00
mike12345567 2b0bdffa65 Fixing an issue with attempting to access a locked app causes a redirect loop locking up browser. 2021-10-06 16:27:46 +01:00
Rory Powell fda5a52630 Fix app creation when there is no app ctx 2021-09-30 17:35:09 +01:00
Martin McKeaveney 6681542ab5 fix tests 2021-09-30 10:35:53 +01:00
Martin McKeaveney 6ebc5a389b remove cloud limits for certain tenants 2021-09-30 10:17:25 +01:00
Martin McKeaveney 757fbbc19c re-adding env var controls for cloud limit functionality 2021-09-27 15:03:48 +01:00
Martin McKeaveney 5b1ae778da fallback SMTP configuration for cloud 2021-09-27 14:57:22 +01:00
Martin McKeaveney b161be85ae automation runs quotas 2021-09-23 23:25:25 +01:00
Martin McKeaveney 85c6fac8f5 usageQuota middleware writing to couch 2021-09-23 22:40:14 +01:00
mike12345567 4e294fbcd9 Adding metadata system and re-writing how Cron works, previously cron only worked in dev because it would never be enabled for the production app ID, this makes it so that it is never enabled for the dev app and when the production app is deployed it runs through all the automations and checks if any need cron jobs setup/disabled. 2021-09-08 19:29:28 +01:00
mike12345567 879f1a2368 Cleanup, prepping for automation history, some refactoring to get rid of concept of builtin. 2021-09-06 17:53:02 +01:00
mike12345567 34397c2e14 Merge branch 'master' of github.com:Budibase/budibase into develop 2021-08-06 13:04:54 +01:00
mike12345567 42f08f97cc Revert "Merge pull request #2253 from Budibase/revert-2076-feature/multi-tenants"
This reverts commit 0d2e2314d4, reversing
changes made to 1beca4ee96.
2021-08-05 09:59:08 +01:00
mike12345567 1c306b60e7 Fixing issue #2193, also fixing the name of the file on export, as well as fixing an issue with the exporters not handling relationships. 2021-08-04 18:20:51 +01:00
Michael Drury f37946d47e
Revert "Multi-tenancy/organisations" 2021-08-04 10:02:24 +01:00
mike12345567 54e765a182 Implementing some changes to how context gets set for tenancy, after testing, as well as updating server. 2021-08-03 15:32:25 +01:00
mike12345567 b5d7e76ec2 Merge branch 'fix/lucene-filtering' of github.com:Budibase/budibase into feature/multi-tenants 2021-07-23 16:10:59 +01:00
mike12345567 e96f45464a Updating internal search to disable features were required. 2021-07-23 13:29:50 +01:00
mike12345567 2bee348721 Fixing test cases. 2021-07-08 00:30:55 +01:00
mike12345567 7581360e9e Merge branch 'develop' of github.com:Budibase/budibase into feature/user-session 2021-07-07 17:17:16 +01:00
mike12345567 79b7747714 Fixing session issues after testing a bit. 2021-07-07 17:15:53 +01:00
Martin McKeaveney 93b562e2df make logged in users basic by default, prevent allowing users to be assigned as default in the UI 2021-07-06 18:43:04 +01:00
mike12345567 36c0e45761 WIP - first version of user sessions. 2021-07-06 18:10:04 +01:00
mike12345567 19da122425 Updating tests to use latest version of jest, which broke a lot of things, but was necessary to get proper ts-jest support. 2021-06-25 13:46:02 +01:00
Andrew Kingston abb1d33948 Lint with prettier 2021-06-15 19:39:40 +01:00
mike12345567 5a9c8daf7b Formatting. 2021-06-08 18:06:56 +01:00
mike12345567 8cffe5c9ff Fixing a collection of issues, specifically users being exported/imported and issues with database import causing weirdness (metadata doc being wrong). 2021-06-08 18:06:16 +01:00
mike12345567 9d3c28ecbf Fixing issue with builder not always having the correct roles to view an app - global builders are now admins in all apps. 2021-06-04 12:13:29 +01:00
Martin McKeaveney b1b73e1380 fixing various babel issues within tests 2021-06-01 17:09:26 +01:00
mike12345567 397a4d883f Fixing server test cases. 2021-05-27 15:40:55 +01:00
mike12345567 24b3635b9b Linting. 2021-05-27 14:55:48 +01:00
mike12345567 bc6660fd0e Updating permissions to allow roles other than builder/admin to use apps properly. 2021-05-27 14:53:41 +01:00
mike12345567 484e22c62d Upping debounce to 30 seconds as it has no real negative. 2021-05-21 15:14:35 +01:00
mike12345567 ae8e88f426 Switching logic for lazy evaluation. 2021-05-21 15:03:28 +01:00
mike12345567 96ad77b41d Formatting 2021-05-21 14:49:59 +01:00
mike12345567 f56250824c Adding a debounced updated at timestamp to applications. 2021-05-21 13:07:10 +01:00
mike12345567 fba63134d1 Fixing some issues found when testing. 2021-05-20 20:48:24 +01:00
mike12345567 2d0122f7d6 A general re-work of some parts of the auth lib, as well as moving roles/permissions around to make it possible to build an admin API which has role knowledge. 2021-05-14 15:43:41 +01:00
mike12345567 4652aaa16f Fixing two issues which were blocking previews, one the user was no longer being updated as an admin (when first building/creating an app) and two, role was not being carried across from global user properly. 2021-05-13 18:10:09 +01:00
mike12345567 e560390d8a Fixing an issue with portal calls causing the app to be re-locked. 2021-05-13 15:32:03 +01:00
mike12345567 799b3fc138 Updating locks to store the whole global user as well as implementing the locks on dev apps fetch. 2021-05-13 12:16:09 +01:00
mike12345567 2fa7ee5bcb Formatting. 2021-05-12 17:43:29 +01:00
mike12345567 f6fbeb4858 Putting together redis lock system. 2021-05-12 17:37:09 +01:00
Andrew Kingston 556236ebce Add explicit prettier options 2021-05-04 11:32:22 +01:00
Keviin Åberg Kultalahti 4ec2e7d01f lint:fix 2021-05-03 09:31:09 +02:00
mike12345567 d985d338ec Updating test cases and some re-work of the email system. 2021-04-23 18:07:39 +01:00
Martin McKeaveney 737e9dba47 config specificity 2021-04-22 11:45:22 +01:00
mike12345567 bb5dbf27aa Some re-work of the auth package, making it a bit easier to use/less likely to make a mistake. 2021-04-21 16:42:44 +01:00
mike12345567 7612b5ed16 Swapping over everything to use the new user ID and updating everything after some end to end testing. 2021-04-20 17:17:44 +01:00
mike12345567 ade007482c Updating the server to remove use of the email in the user ID. 2021-04-19 16:26:33 +01:00
mike12345567 8e729f92e1 Some more server-side fixes, updating it so that builders have permissions to do anything for now (means that a builder user doesn't have to be present in app database to work. 2021-04-14 16:00:58 +01:00
mike12345567 8b20fcb573 Getting most of the test auth working, adding in global builder configuration. 2021-04-13 18:12:35 +01:00
mike12345567 a8f7977510 Merge branch 'feature/global-user-management' of github.com:Budibase/budibase into feature/global-user-management 2021-04-13 17:12:09 +01:00
mike12345567 d0bdd113e1 Removing the lookup of _id in usage quota when in dev/self host for performance reasons as part of usage quota, re-writing some bits of fetch self for cleaner implementation, fixing some issues with updating/saving users from within app. 2021-04-13 17:11:55 +01:00
Martin McKeaveney 06f3b1fbad ensuring public users can log in after being assigned a roleId 2021-04-13 16:56:45 +01:00
mike12345567 7e6855262b Fixing some issues with the ctx.user, this was previously filled in by the old auth middleware. 2021-04-13 15:27:47 +01:00
mike12345567 42ed66703a Updating current app to set up role in middleware. 2021-04-13 14:35:00 +01:00