Commit graph

2518 commits

Author SHA1 Message Date
David Mehren
dd11483f44
Migrate config/index.js to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
Philip Molares
637833ab18
created logger.ts
moved the added stream part directly into the config of morgan in app.ts.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
Yannick Bungers
bb8297dca3
Added Types to actions.js and reformat
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
Philip Molares
f9193822a7
created letter-avatars.ts
added @types/randomcolor

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
David Mehren
7cdcf627db
note.ts: ESLint fixes, add types for diff-match-patch
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
David Mehren
f8eb958f16
realtime.ts: Many ESLint fixes
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
Yannick Bungers
de09524658
Added Types and reformating code
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:04 +02:00
Yannick Bungers
84e021a0b0
Added types
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
Yannick Bungers
c6655d767a
changed for loop to foreach
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
Philip Molares
4eb71d6cad
reworked user.ts
- fixed imports
- removed complicated ternary operators
- simplified parseProfile
- added enum ProviderEnum
- added type Profile
- added type PhotoProfile

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
David Mehren
2c40255ac2
Error on too many semicolons
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
David Mehren
0228d00c56
Use ESLint and 'typescript-eslint' plugin.
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
Philip Molares
22683451bd
changed imports to new ./modules import style
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:03 +02:00
Philip Molares
d278a106e8
added model exports in index.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
91352d0d3c
tsconfig.json: Sequelize classes need ES6, debugging needs source maps
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
77e84a18ee
Migrate realtime.js to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
0ad30a0029
revision.ts: Formatting, use Utils instead of global Sequelize object
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
477a37b48c
note.ts: Formatting, use Utils instead of global Sequelize object
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
522d92a9a1
app.ts: Use let/const instead of var, fix sequelize import
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
8c662a1f41
Move stripNullByte and processData from models/index.ts to utils.ts
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:02 +02:00
David Mehren
03ae37055d
Migrate utils.js to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
e87c8f04e5
Migrate app.js to TypeScript
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
77e336dfda
Various refactors to use the new models
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
4e02f46cee
More static methods in revision.ts
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
0c078f5266
Fix types for foreign keys
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
1d4107fe90
Migrate models to TypeScript
Co-authored-by: David Mehren <dmehren1@gmail.com>
Co-authored-by: Yannick Bungers <git@innay.de>
Co-authored-by: Philipp Hochkamp <me@phochkamp.de>
Co-authored-by: nzbr <mail@nzbr.de>

Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00
David Mehren
54cd556f2f
Add sequelize-typescript
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 12:36:39 +02:00
Sheogorath
984061c863
Merge pull request #333 from ErikMichelson/fix/i18n
Fixed wrong locales search path after app.js move
2020-04-24 20:00:17 +02:00
Erik Michelson
7838f9b03a
Added config property for locales
There's a new config property 'localesPath' - pointing to './locales' by default. The path resolution is similar to the docsPath, uploadsPath etc.

Signed-off-by: Erik Michelson <erik@liltv.de>
2020-04-24 19:09:18 +02:00
Erik Michelson
760591b9b0
Fixed wrong locales search path after app.js move
Signed-off-by: Erik Michelson <erik@liltv.de>
2020-04-24 16:42:03 +02:00
Sheogorath
7f9c79323b
Merge pull request #332 from ErikMichelson/fix/eslint
Fixed eslint error introduced by 2d3ea1f
2020-04-24 03:24:09 +02:00
Erik Michelson
76f07efcbc
Fixed eslint error introduced by 2d3ea1f
Signed-off-by: Erik Michelson <erik@liltv.de>
2020-04-24 03:15:19 +02:00
Sheogorath
d2ace4b2a0
Merge pull request #330 from Skgland/master
Pass through ldap starttls option
2020-04-23 23:34:46 +02:00
Sheogorath
4104f9835d
Merge pull request #278 from elespike/master
Add OIDC scopes for email & profile retrieval
2020-04-22 20:56:58 +02:00
Bennet Bleßmann
d2b963f652
add resolution to resolve sub-package dependency ldapauth-fork to at least 4.3.0
Signed-off-by: Bennet Bleßmann <bb-github@t-online.de>
2020-04-21 16:07:25 +02:00
Bennet Bleßmann
5fad6a25a8
Pass through ldap starttls option
Fixing Issue #329

(cherry picked from commit b9169eb279020f21b372a843a83c71929fb6fd1d)

Signed-off-by: Bennet Bleßmann <bb-github@t-online.de>
2020-04-20 10:55:50 +02:00
Sheogorath
301ab04839
Merge pull request #324 from SISheogorath/fix/unintended-migrations
Limit DB schema changes to migrations
2020-04-17 14:35:52 +02:00
Sheogorath
b3249d9175
Limit DB schema changes to migrations
Database migrations should be in charge of changing and modifying the
database schema. Therefore this breaking change removes the automatic
model synchronisation from the application startup, that we have
practised way too long and that always caused problems for us.

References:
https://sequelize.org/v5/manual/getting-started.html#note-for-production
81e3d7bd00
f85ba6df53

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-04-16 16:20:11 +02:00
Sheogorath
2d3ea1fc61
Merge pull request #312 from PascalBru/feature_301
add icon to toolbar with list of diagrams
2020-03-26 00:26:12 +01:00
Pascal Bruckert
3f047e33c4 add icon to toolbar with list of diagrams
Signed-off-by: Pascal Bruckert <pascal.bruckert@bit-sci.com>
2020-03-25 19:38:32 +01:00
Sheogorath
799d67fea3
Merge pull request #299 from naimo/master
add help about note deletion in features.md
2020-03-14 11:00:41 +01:00
Naimo
f534485930 add help on note deletion in features.md
Signed-off-by: naimo <nicolas@aimon.fr>
2020-03-13 20:50:03 +01:00
Sheogorath
010a3f6f15
Merge pull request #293 from Cpavrai/release/2.0.x
Fixes relative path for fetching the style
2020-03-06 13:26:49 +01:00
Charles Parmentier
856fc01fb9 Fixes relative path for fetching the style when set
Signed-off-by: Charles Parmentier <charles.parmentier@hotmail.com>
2020-03-06 00:09:54 +01:00
Sheogorath
97628595ed
Fix unsused import of fs
Let's make the CI happy again :-)

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-02-26 15:11:24 +01:00
Sheogorath
144f17aade
Update yarn.lock
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-02-26 15:09:26 +01:00
Sheogorath
a2522888b2
Remove PDF export
As we already decleared in earlier versions, this patch removes PDF
export entirely. It's a not acceptable security risk for every CodiMD
instance.

The current implementation allowed to extract arbitary files from the
CodiMD host and therefore leaking secrets from a `/etc/passwd` to
CodiMD's own config files and all secrets contained in it.

Thanks to Joona for finding this vulnerability in August last year,
which lead to an emergency disabling of PDF exports in 1.5.0.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-02-26 15:05:54 +01:00
Sheogorath
37923d11f8
Rewrite slide controller to TypeScript
Before this patch the non-TypeScript version of the slide mode causes
problems with the TypeScript code. Therefore, in order to get things
working, this patch does minimalistic changes to the slide mode
controller to bring it into TypeScript convention. And unbreak slide
mode. Further changes are required, but this gets slide mode back to a
usable state.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-02-26 15:05:51 +01:00
Sheogorath
a3f5dcb4c7
Merge pull request #258 from ErikMichelson/misc/dropMattermost
Remove mattermost integration
2020-02-25 15:02:50 +01:00
Erik Michelson
c976217c12
Remove mattermost integration
Signed-off-by: Erik Michelson <erik@liltv.de>
2020-02-25 14:33:30 +01:00