summaryrefslogtreecommitdiff
path: root/bin (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-03-21Fixed eslint errors (whitespaces)Erik Michelson1-19/+23
Signed-off-by: Erik Michelson <erik@liltv.de>
2020-03-21Clean up all foreign-key constraintsSheogorath1-0/+20
This patch cleans up the remaining possible foreign-key constraint. This case seem to appear, when notes are deleted, but due to missing database contraints not their authroships. This function should clean that up as well and complete the preparation for the new db contraints. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-03-21Reduce requested arguments on cleanupSheogorath1-6/+13
In order to prevent OOM situations due to large databases, this patch should reduce the amount of data requested from the database drastically. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-03-21fixup! Add fix for missing deletion of notes on user-deletion requestSheogorath1-0/+17
2020-03-21Add fix for missing deletion of notes on user-deletion requestSheogorath1-0/+56
Depending on how the system was setup, this bug lead to keep user's data around even after a successful deletion of user'S account. This patch will make sure the missing database constraints are implemented and missed out deletions are executed. This bug was introduced to insufficent testing after implementing the feature initially. It was well tested, using the app process itself, but the migrations where missed out. I'm currently not sure, if there was also a change in how sequelize handles cassaded deletion, since I'm unter the impression that before switching to sequelize 5, this feature has worked. But I haven't verified this. No matter what, the cleanup process is rather straight forward and will be invoked on migration, but can also be done manually using the new `bin/cleanup` script. This change will result in a release 1.6.1. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-01-11heroku complains about dialectClaudius1-2/+1
Signed-off-by: Claudius <opensource@amenthes.de>
2019-12-09Check for falsy existing_user variable. Fixes #234Soeren Wegener1-4/+4
Use another return code for "User already exist" This allows external scripts to differentiate between failure reasons. Signed-off-by: Soeren Wegener <wegener92@gmail.com>
2019-03-31cleanup of the heroku configurationClaudius1-8/+2
this removes the general `postinstall` call to `bin/heroku` and instead puts it into a heroku-prebuild hook. At the same time, env vars get updated to use the `CMD` prefix. The configured buildpacks were not used. Finally, npm run build is now automatically done by Heroku. Signed-off-by: Claudius <opensource@amenthes.de>
2019-03-27Update links to new repositoriesSheogorath1-1/+1
After a long discussion, it turned out that CodiMD as community project and HackMD as a company, have fundamental different views on the project governance. Due to this, it came to point where the decision for a fork was made. After the fork and move towards an own organisation, this patch updates all links inside the project to the new repositories. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-01-10Fix broken manage_users after Winston upgradeDaan Sprenkels1-1/+1
Commit c3584770 upgrades Winston and with that version `logger.transports.console` becomes undefined. This commit updates the code to prevent the crash. Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>
2018-10-29feat(bin): ensure email existsErona1-0/+4
Signed-off-by: Erona <erona@loli.bz>
2018-10-29feat(bin): add option --reset to reset user passwordErona1-1/+21
Signed-off-by: Erona <erona@loli.bz>
2018-10-29refactor(bin): add function getPass in bin/manage_usersErona1-8/+11
Signed-off-by: Erona <erona@loli.bz>
2018-10-29refactor(bin): eliminate `var` and use template string refactor string thingsErona1-15/+16
Signed-off-by: Erona <erona@loli.bz>
2018-10-29refactor(bin): add function showUsage to refactor usage thingsErona1-8/+7
Signed-off-by: Erona <erona@loli.bz>
2018-10-29refactor(bin): refactor check args in bin/manage_usersErona1-14/+17
Signed-off-by: Erona <erona@loli.bz>
2018-09-06Some minor improvements for setup scriptSheogorath1-4/+6
Since we use `yarn` for our container setup and try to enforce dependencies, we should also use yarn in the setup script. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-24Rebrand HackMD to CodiMDSheogorath1-4/+3
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-29Prevent "wrong type"-issueSheogorath1-1/+1
The argument is may interpreted as number which causes the "pass" parameter of the user creation to fail. Probably the same applies to the mail address. But mail addresses are by definition not allowed to start by a number (iirc) which makes it less a problem. This is mainly a quick fix. Should be refactored a bit in future. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-29Add simple user-management tool for emailsignin …Dario Ernst1-0/+89
Currently, administrators of closed instances need to manually fiddle in their databases for user-management. This commit adds a small commandline utility that allows to create and delete users. Signed-off-by: Dario Ernst <dario@kanojo.de>
2017-10-10Prevent argument breaking by spacesSheogorath1-2/+2
2017-05-07Remove npm install in heroku buildYukai Huang1-2/+0
since heroku detects yarn.lock automatically
2017-01-23Add fail fast optionSheogorath1-0/+2
Fail the script if a command inside it fails to prevent a install with exitcode 0 even when commands in it are failing.
2017-01-13Remove config.js from setup filesYukai Huang2-6/+0
2017-01-04Revert "Rename npm script"bananaappletw1-1/+1
This reverts commit ed83dfc862768572eab0c2aed629b1700ac9e224.
2016-12-22Remove unnecessary db config of herokubananaappletw1-6/+0
2016-12-12Simplify output with sequelize database argumentYukai Huang1-29/+2
2016-12-12Fix heroku production db settingYukai Huang1-1/+34
2016-12-11Remove bower occurencesYukai Huang2-9/+3
2016-12-10Rename npm scriptYukai Huang1-1/+1
webpack scripts are meant to “build” assets, so place them under the same namespace * dev => build:dev * build => build:prod
2016-10-16Config heroku deploymentYukai Huang2-2/+39
2016-10-10Extract config.js from common.js to make client setting file clean and also ↵Wu Cheng-Han1-3/+3
make upgrade easier
2016-10-05Do not recommend anything in setup scriptYukai Huang1-2/+5
2016-10-05Copy config only when file not existYukai Huang1-3/+11
2016-10-05Update config descriptionYukai Huang1-3/+3
2016-10-05Create bin/setup scriptYukai Huang1-0/+41