Commit Graph

33 Commits

Author SHA1 Message Date
Doug Lauder
8be71b1498
Don't insert nulls into blocks_history table. (#1890)
Ensure all fields are non-NULL when inserting into blocks_history (on block delete).
2021-12-03 12:32:57 -05:00
Miguel de la Cruz
e7c38c8822
Adds data migrations and the unique IDs migration (#1776)
* Adds data migrations and the unique IDs migration

* Adds GetSystemSetting tests

* Add log statements to data migrations

* Move migrations to the store and ensure they follow an order mixing database and data migrations

* Fix system settings

* Add tests for unique id migration

* Small comment change

* Make a couple of methods private and wrap the migration in a transaction

* Update public methods

* Add database mutex to data migrations

* Create server params and pass a mutex factory to the store

* Fix plugin linter

* Make isPlugin private

* Fix comment typo

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2021-11-11 17:01:43 +01:00
Miguel de la Cruz
8666bc833a
Adds a generator that wraps store methods with transactions and migrates implementations to use transactions (#1440)
* Adds a generator that wraps store methods with transactions and migrates implementations to use transactions

* Remove OpenTracing parameters from the generator

* Remove unused template methods

* Generate transactional methods only for those labelled as so

* Fix linter
2021-10-22 12:48:53 +02:00
Harshil Sharma
08db4fed61
Workspace switcher (#1052)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2021-09-08 10:22:03 +05:30
Jesús Espino
c734cfb8d1
Adding support for patch blocks (#877)
* Adding support for patch blocks

* Adding some improvements

* Adding api integration test for patch

* Adding SQL store tests

* Regenerating autogenerated code

* Fix linter errors

* Remove wrong update of the swagger file

* Update server/model/block.go

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* Fix gofmt

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
2021-08-06 14:10:24 +02:00
Harshil Sharma
e0ec1c03e0
New Props: Created By, Created At, Updated By, Updated At (#583)
* Added create_at column for blocks

* Populating created by

* Added logic for storing created by

* Added GetBlock by ID to store interface

* Added creayed by and modified by properties

* Added created by and modified by properties

* Added lastmodifiedat property

* Fixed existing webapp test

* Added webapp unit tests

* Added webapp unit tests

* Added webapp unit tests

* Adding server test

* Added server tests

* Fixed a bug causing created by to be set empty

* Avodining timezone specific test behavior

* Made cypress viewport bigger to avoid out-of-viewoport issues in multiple tests

* Removed a leftover comment

* Added updated at/by in table view

* Added updated at in card view

* Fixing sort

* Fixed sorting of updated by

* Fixed existing tests

* Added table tests

* Added cardTree fix

* Fixed tests

* Removed unused import

* Update snapshots

* Added a tamper attempt test

* Removed some leftover debug code

* Removed sending creator from client

* Fixed lint error

* Fixed a build issue

* Avoided setting insert query params multiple times

* Multiple minor review fixes

* Fixed test
2021-07-08 20:06:43 +05:30
Doug Lauder
66975bdfe9
First pass linter cleanup (#603)
* first pass linter cleanup

* address review comments
2021-06-21 11:21:42 +02:00
Doug Lauder
46243c1ad1
Telemetry and metrics (#496)
- total blocks by block type
- total workspaces
- blocks activity (insert/delete)
- login success / fail
2021-06-04 10:38:49 -04:00
Harshil Sharma
90f6389745
Person Property Type (#406)
* Added getWorkspaceUsers API

* Integrated workspace user API in UI

* Integrated workspace user API in UI

* Added toto for implementation slot

* Implemenmted getWorkspaceUSers to get data from Focalboard DB

* Updated store mocks

* Made select styles a shared constant

* Removed unwanted diffs

* Removed unwanted diffs

* Updated snapshots for new property type

* Added user store test

* Added missing copyright notice

* Returning error if no users found to retain original behavior

* Minor fixes and added tests

* Minor fixes

* Used React context for workspace users

* Used useContext hook, and added additional user ID -> user context to avoid that computation by all componnets

* Mergerd both workspace user contextx

* Minor review fix
2021-06-04 18:53:15 +05:30
Jesús Espino
f1b8d88d6b
Changing mattermost-auth method to work based on shared database access (#335)
* Improving mattermost auth implementation

* Making mattermost-auth based on shared database access

* Reverting unneeded changes in the config.json file

* Fixing tiny problems

* Removing the need of using the mattermost session token

* Fixing some bugs and allowing to not-bind the server to any port

* Small fix to correctly get the templates

* Adding the mattermost-plugin code inside focalboard repo

* Adding a not working code part of the cluster websocket communication

* Updating the mattermost version

* Adding the cluster messages for the websockets

* Updating to the new node version

* Making it compatible with S3

* Addressing some tiny problems

* Fixing server tests

* Adds support for MySQL migrations and initialization

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
2021-05-24 19:06:11 +02:00
Hossein
e2dd9a978a
Add Export/import board (#403)
* Resolve GH-261

* fix eslint

* Address comments

* update mocks

* add test
2021-05-13 15:04:49 -06:00
Chen-I Lim
725971784b Workspace backend support 2021-03-26 11:01:54 -07:00
Bo-Yi Wu
2b4e03eed6 chore(format): update coding style 2021-03-21 16:28:26 +08:00
Chen-I Lim
3b4f712649 active user count 2021-01-27 10:01:24 -08:00
Chen-I Lim
d641039131 Registered user count 2021-01-27 09:22:33 -08:00
Chen-I Lim
3995cbd0e4 Product name 2021-01-26 14:13:46 -08:00
Chen-I Lim
6af0780c17 Merge branch 'main' into admin-local 2021-01-22 11:28:45 -08:00
Chen-I Lim
1286349a22 Change password 2021-01-21 10:16:40 -08:00
Chen-I Lim
91f51fe0b9 Local server on unix port, admin set password 2021-01-20 13:52:25 -08:00
Chen-I Lim
7915564d2c Require signup token to register 2021-01-13 16:56:01 -08:00
Chen-I Lim
61fb38d418 Allow GetSubTree without auth. WIP 2021-01-12 18:49:08 -08:00
Chen-I Lim
2f71295275 Get/set sharing 2021-01-12 15:35:30 -08:00
Chen-I Lim
7052a022b3 Store modifiedBy for deleted blocks 2021-01-12 11:16:25 -08:00
Jesús Espino
e08f9a9c96 Improving sessions handling 2020-12-07 17:04:35 +01:00
Jesús Espino
7382f9c55c Adding sessions code 2020-12-02 21:12:14 +01:00
Jesús Espino
11d336fef0 Merge remote-tracking branch 'origin/main' into auth 2020-11-17 15:44:04 +01:00
Chen-I Lim
37fd30413b Duplicate board 2020-11-12 10:16:59 -08:00
Jesús Espino
35ebd44d24 More work on authentication 2020-11-06 16:46:35 +01:00
Jesús Espino
72f4783e34 Some other code improvements from the golangci 2020-10-22 15:22:36 +02:00
Jesús Espino
fe39696e26 Adding mock store and pin the generators/tools to specific versions 2020-10-21 09:56:03 +02:00
Jesús Espino
94bfa840e8 Add initial telemetry code, system_settings table and the task scheduler 2020-10-19 14:55:31 +02:00
Jesús Espino
3c15957e3d Adding golang migrate to handle database migrations 2020-10-16 22:26:47 +02:00
Jesús Espino
55e49bea51 Abstracting more the store concept 2020-10-16 19:20:43 +02:00