Commit Graph
50 Commits
Author SHA1 Message Date
Umputun 643f255832 fix sorting after altering find results 2019-02-11 16:15:41 -06:00
Umputun 08ab725b3d lint: missing a comment for service.Find 2019-02-10 16:46:21 -06:00
Umputun 13c511b1b0 support controversy in Find for comments stored without it #274 2019-02-10 16:39:08 -06:00
Umputun 7128f66374 add controversy value (votes metric) #274 2019-02-10 15:53:29 -06:00
Umputun 72b60bf823 const for cache TTL 2019-02-02 23:26:03 -06:00
Umputun 38fc7e500c simplify title setter with anon func 2019-02-02 22:29:02 -06:00
Umputun e6f30b0768 sync with preemptuve lock in concurrent migrator 2019-02-02 18:45:24 -06:00
Umputun 588af7fc9a switch title to lcw cache, optimize error hits 2019-02-02 18:25:57 -06:00
Umputun a731856bb1 fix shared title client caused races 2019-02-02 17:50:13 -06:00
Umputun b106fe0fc6 increase size of last comments for reply detection to 5000 and time to 31 days #268 2019-01-27 14:28:24 -06:00
Umputun c7468184ba fix unexpected blocking if +1 vote in positive score only mode on 0 2019-01-26 17:05:54 -06:00
Umputun cb5fc79dbe add site-level positve score support #260 2019-01-26 01:38:56 -06:00
Umputun 9375f250d8 switch restricted words logging to log 2019-01-21 17:03:22 -06:00
Umputun 84488182a2 avloid tokenization if lister failed or an empty list of restricted words #237 2019-01-21 16:52:49 -06:00
Aleksandr MelnikovandUmputun ab6c9a515c Support restricted words (#257)
* prepared interfaces and naive implementation for restricted words

* fixed whitespace tokenizer last token handling

* removed unnecessary check in whitespace tokenizer last token handling

* removed unnecessary interfaces, added matcher to service

* now using more explicit naming

* added config parameter/env variable to configure restricted words
provided simple matcher and lister implementation into service

* fixed linter warnings

* fixed linter warnings (part 2)

* added functional tests for rest api
moved check for restricted words into validation stage

* fixed missing error check in rest private test

* fixed failed test that expected validation in specific order

* fixed linter warning

* removed unnecessary 'else'

* removed redundant check from 'DataStore.EditComment'

* replaced exact matching for restricted words with wildcard matching

* fixed race condition when creating wildcardTrie
removed unnecessary wildcard masks
refactored tests in a table format

* improved documentation for restricted words param

* removed wildcardTrie caching as a premature optimization
removed unnecessary validation method ValidateCommentText
moved restricted words validation into service methods that create and update comment

* fixed error name due to linter warning
2019-01-21 16:48:35 -06:00
Umputun 168088445f add caching for replied ids 2019-01-17 01:20:19 -06:00
Umputun 79a8bfe453 don't exclude reply to myself from HasReply detection https://github.com/umputun/remark/issues/248#issuecomment-454882841 2019-01-16 12:20:05 -06:00
Umputun dff266ec01 add detection of reply and disable edit for such comments #248 2019-01-15 17:05:30 -06:00
Umputun 781d90e98b switch to lgr 2019-01-07 22:32:50 -06:00
Umputun 8d978ffaf1 add post title to rss item 2019-01-06 15:31:29 -06:00
Umputun 6edd24185c lint: missing comment 2019-01-06 14:57:21 -06:00
Umputun 3472475a82 add rest and batch (cleanup --title) support for title's #241 2019-01-06 14:52:43 -06:00
Umputun 4096302a06 test title not changed if presented 2019-01-05 20:58:34 -06:00
Umputun ea2d87322c don't pull title if passed by client already 2019-01-05 13:47:11 -06:00
Umputun 0fd8657992 make title extractor optional 2019-01-05 13:22:28 -06:00
Umputun 690a0aa763 add post title to comment 2019-01-05 04:24:49 -06:00
Umputun 7b54b00c01 switched to auth 0.3 2019-01-04 18:09:18 -06:00
Umputun 09de97ffd6 resort imports 2018-12-28 00:02:35 -06:00
Umputun c01bf58c0b add IsAdmin test 2018-12-24 01:08:08 -06:00
Umputun fd90623343 missing test for meta accessor with blocked users 2018-12-24 01:03:04 -06:00
Umputun 7484649621 ass test for metas set 2018-12-23 03:26:19 -06:00
Umputun f3619b4fc3 adjust tests for v1 native format 2018-12-23 03:01:44 -06:00
Umputun be3d1bdf3e simplify import & export 2018-12-23 02:23:54 -06:00
Umputun 616e4e2c1c sort metas for consistency 2018-12-21 02:21:58 -06:00
Umputun a0dff0a4f0 adjust export tests 2018-12-21 00:13:13 -06:00
Umputun 110566a658 change native export to new format 2018-12-21 00:01:59 -06:00
Umputun 10f21f78f0 basic test for Metas service 2018-12-20 02:49:56 -06:00
Umputun 25d3d3a5f4 add service level Metas accessor 2018-12-20 00:02:36 -06:00
Umputun 154e23f8fb fix no-votes issue with wrong check for 0 value 2018-11-24 12:19:54 -06:00
Umputun 1432ec44d7 add unlimited votes constant to avoid magic -1 value on the caller side 2018-11-24 12:13:07 -06:00
Aleksandr MelnikovandUmputun f8517fd6a8 fixed zero vote limit not respected and treated as unlimited (#224)
* fixed problem when zero vote limit was not respected and was treated as unlimited

* fixed TestRest_Vote
2018-11-24 12:05:02 -06:00
Aleksandr MelnikovandUmputun f8e36551ea added maximum votes limit per comment (#223)
* added maximum votes limit per comment

* added 'max-votes' param description into README
2018-11-23 17:47:42 -06:00
Umputun 6458f622d2 refactor to combine admin and key store 2018-09-11 11:58:50 -05:00
Umputun d4c36edc55 add delete flag to edit request #200 2018-09-06 10:35:31 -05:00
UmputunandGitHub 0cd76dfd2f Feature/admin_store (#197)
* generalize admins and email info with store interface

* lint: missing group comment

* fix admin group with shared substruct
2018-09-02 13:00:20 -05:00
Umputun 8503e31f64 reformat imports 2018-08-15 22:14:30 -05:00
UmputunandGitHub 2ff955edf1 feature/comment-formater (#186)
* extract comment formatter functuionality to allow md in #156

* add abilty to pass multiple convertors to formater
2018-08-10 19:35:45 -05:00
UmputunandGitHub 1b9ee3d763 feature/keystore (#185)
* add keyStore and switch all secret usage to this store

- implement static ks
- add shared secret

* lint: shadow in jwt and missing comment

* rename static key group to shared and use top-level shared secret

* move siteID extraction (from token) to internal func

* lint: merge var and assign for key test
2018-08-08 14:33:18 -05:00
UmputunandGitHub 7a6eca56b1 feature/jwtcleanup (#113)
* remove extra dmin check, add blocking check via jwt and auth middleware
* short jwt and refresh for expired
* lint: missing comment on UserFlager
* simplify user management in auth refresh
* allow custom max cookie age
* test blocked user
* reset cookie for blocked user
* move admin perm detection to data service
* customizable ttl with opts as a part of auth group
* add local auth provider dev
* main minimal test for dev auth mode
* add comments and update docs with current params
* add admin and auth_dev flags
* comments for dev compose
* lint: shadow err
2018-06-27 01:43:13 -05:00
UmputunandGitHub 7aee7add08 Feature/backend (#101)
* move backend code #99

* adjust drone build for backend subdir

* move .rest to backend
2018-06-23 12:31:19 -05:00