147 Commits (3f950d51625b5e76a626d3b7f683da85047075ff)

Author SHA1 Message Date
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Julian Lam 922d49be0b fix(style): switch..case 5 years ago
Julian Lam cf00cda07c refactor: src/flags.js because codeclimate 5 years ago
Julian Lam 8d995d1eb6 refactor: flags detail page
- Show account moderation history
- Ban and delete quick actions

Squashed commit of the following:

commit 0e782e65f4d48ae814708e510ec9d01bcdd914e0
Author: Julian Lam <[email protected]>
Date:   Tue May 26 20:24:53 2020 -0400

    fix(deps): use persona 10.1.41/vanilla 11.1.17

commit 369e073d3c3189d8ce181eb3d573489cbe54d4fc
Author: Julian Lam <[email protected]>
Date:   Tue May 26 20:23:24 2020 -0400

    fix: allow ban and delete exported methods to have cbs

commit b83a086ea31a77ec82d161306c0b9bc115cb2a3a
Merge: 525aae1ea 256ee45d3
Author: Julian Lam <[email protected]>
Date:   Tue May 26 08:54:25 2020 -0400

    Merge remote-tracking branch 'origin/master' into flags-improvements

commit 525aae1ea2e5d0103028a0f0c8dde05f172d088e
Author: Julian Lam <[email protected]>
Date:   Tue May 26 08:53:39 2020 -0400

    feat: integrate ban history and username changes to flag history list

commit 3e68ad28ba266f4c8620a676aa7f463f0a9d1df7
Author: Julian Lam <[email protected]>
Date:   Mon May 25 18:22:53 2020 -0400

    feat: allow ban and deletion from flag details page

commit a559ea1d8e8883385c2876868d855a0b93516c54
Author: Julian Lam <[email protected]>
Date:   Mon May 25 18:22:00 2020 -0400

    feat: export banAccount and deleteAccount methods from accounts module
5 years ago
Barış Soner Uşaklı 5ebcdb1806 fix: #8287, fix users:flags as well 5 years ago
Barış Soner Uşaklı 0391856d7d fix: #8286, rescind notif when its resolved/rejected 5 years ago
Julian Lam ccc6118d30
Testing suite integration for openapi spec (#8263)
* feat: testing suite integration for openapi spec

The testing suite now takes the openapi spec into account. It will
check each route defined, make a call to it, and compare the
response with the defined schema. Any mismatches will cause the
test to fail.

* fix(openapi): removed debug stuff from tests

* fix(openapi): fixed some tests

* fix(openapi): added additional check to tests, test fixes

* fix(openapi): better tests, fixed spec errors

* fix(openapi): bad conditional in test

* fix: oops

* fix(openapi): more tests fixing

* fix(openapi): more tests

* fix(openapi): fix some more tests

* fix: verbose'd an info log

* fix: topic pagination route returns schema-optimized pagination block

* fix(openapi): more test/spec fixes

* fix(openapi): accidentally sending in authenticated jar for anon routes

* fix(openapi): more test/spec fixes

* fix(openapi): more spec fixes

* fix: timestampReadable Invalid Date

* fix(openapi): more tests... almost there

* fix(openapi): more tests fixing

* fix(openapi): finally all tests passing

* fix(openapi): added reverse test to compare response to spec

... and fixed all the tests that broke

* fix: remove tests related to group covers, as route is gone

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): object cache is not present for psql

* fix: tests

Co-authored-by: Barış Soner Uşaklı <[email protected]>
5 years ago
Barış Soner Uşaklı 51236df4ed fix: check if user has read priv before flagging 5 years ago
Julian Lam 8e5a2276af
feat: check flag values on save (assignee and state) (#8122)
* feat: add assignee checking when updating flag

Prior to this, it was possible to update the assignee to any value (or
any user. This commit adds checking to allow only admins, global
moderators, or in the case of flagged posts, moderators.

Also some prep work was added for value checking `state`.

* feat: value checking `state` on flag update

The state should be one of the constants defined earlier in the file.
5 years ago
Baris Usakli 2150701f32 fix: missing await 6 years ago
Baris Usakli ac6eb31c69 refactor: async/await flags.js 6 years ago
Barış Soner Uşaklı 0ced71be39 refactor: async/await flags 6 years ago
Baris Usakli a651d154ce fix: #7921, dont create wrong entries in db for flag
upgrade script to remove wrong entries
6 years ago
Barış Soner Uşaklı e32a55460f refactor: remove logs 6 years ago
Barış Soner Uşaklı 9ee1a882ec refactor: async/await flags 6 years ago
Julian Lam 0921230976 fix(style): updated code to follow new eslint recommendations
Squashed commit of the following:

commit f9ce878b269b3568f0d649309aae1af4dcfdfeef
Author: Julian Lam <[email protected]>
Date:   Tue Aug 13 14:30:46 2019 -0400

    fix(style): updated code to follow new eslint recommendations

commit 80dd370e413f22badb96ff2138e7991dfff6d836
Author: Julian Lam <[email protected]>
Date:   Tue Aug 13 14:14:58 2019 -0400

    fix(deps): update dependency sitemap to v4

    Squashed commit of the following:

    commit f4dd9cabb21e26fdc21f8413be822ea7c64251f8
    Author: Julian Lam <[email protected]>
    Date:   Tue Aug 13 11:33:05 2019 -0400

        fix: resolved breaking changes from sitemap v4 upgrade

    commit 9043415ee16dcc27a8dcc2e4479d1bc5e2d1b60e
    Merge: e3352b272 72590b346
    Author: Julian Lam <[email protected]>
    Date:   Tue Aug 13 11:09:55 2019 -0400

        Merge branch 'master' into renovate/sitemap-4.x

    commit e3352b272eb9400bdb00774973181397803765e4
    Author: Renovate Bot <[email protected]>
    Date:   Mon Aug 12 07:59:05 2019 +0000

        fix(deps): update dependency sitemap to v4

commit 8e3c0cdcae22acc32d352be8bb72d60e7502dbc5
Author: Renovate Bot <[email protected]>
Date:   Fri Aug 9 00:49:51 2019 +0000

    fix(deps): update dependency commander to v3

commit 2104449d38818f2fa4d44b3a58a0a168781acbfb
Author: Renovate Bot <[email protected]>
Date:   Tue Aug 13 15:00:27 2019 +0000

    fix(deps): update dependency mongodb to v3.3.0

commit d2937f446a21131c070ae5d0ff33d67cfe465b8c
Author: Barış Soner Uşaklı <[email protected]>
Date:   Tue Aug 13 10:36:48 2019 -0400

    feat: async/await admin/controllers

commit 1b97e8b199f960dc24e5722702f27499ae049914
Author: Misty (Bot) <[email protected]>
Date:   Tue Aug 13 09:28:39 2019 +0000

    Latest translations and fallbacks

commit 69a48957a2f0d23c4d194b664bda3a0431179c01
Author: Barış Soner Uşaklı <[email protected]>
Date:   Mon Aug 12 21:56:09 2019 -0400

    feat: async/await

commit b9b2a7e593a452de4bef6d0ab6abe368a3bdb8dd
Author: Barış Soner Uşaklı <[email protected]>
Date:   Mon Aug 12 20:58:29 2019 -0400

    feat: async/await refactor

    controllers/accounts

commit a8d43a175974a0c8ae3dc132bf51a7ed9a4c6305
Author: Baris Usakli <[email protected]>
Date:   Mon Aug 12 14:49:40 2019 -0400

    feat: async/await controllers/accounts

commit 2f25aae57bf9dbe98d655276770e56bed9ec023b
Author: Barış Soner Uşaklı <[email protected]>
Date:   Sun Aug 11 23:09:50 2019 -0400

    fix: #7831, fix pagination

    convert to async/await

commit c9e83f2374572264855a04156278eef256b0a20c
Author: Barış Soner Uşaklı <[email protected]>
Date:   Sun Aug 11 00:14:35 2019 -0400

    fix: remove empty line

commit 30be91b26c4dd7583412c4e8d56e9c1688e48a44
Author: Barış Soner Uşaklı <[email protected]>
Date:   Sun Aug 11 00:13:41 2019 -0400

    fix: remove useless catchs and empty line

commit 2e4a71c0b6104738f15ffbfe3246105b922fdfb3
Author: Renovate Bot <[email protected]>
Date:   Sat Aug 10 06:51:50 2019 +0000

    chore(deps): update dependency eslint-config-airbnb-base to v14
6 years ago
Barış Soner Uşaklı 0d047f4eb9 feat: #7743, webserver 6 years ago
Barış Soner Uşaklı 7b95ebbb6a fix: #7748, if reputation system is disabled, dont check min reputation 6 years ago
Julian Lam 91f0bce628 fix: #7624, default open state on stateless flags 6 years ago
Barış Soner Uşaklı 81aa3a0b8a fix: don't crash in flags.validate if user blocked target 6 years ago
Julian Lam d027207f88 fix: flags detail page crash if reporter blocks author
Fixed an issue where the flags detail page would crash if the
reporting user flagged a post and then proceeded to block the
post author.

Retrieval of a flag's target data should be irrespective of
block status.

fixes #6925
7 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 7 years ago
Barış Soner Uşaklı 9c022afae1
Parse int (#6853)
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
7 years ago
Barış Soner Uşaklı dff86b1ac9 closes #6740
* flag notifications will go to the flag details page instead of the post or user that was flag
* if you assign a flag to yourself you won't get a notification about it
@benlubar
7 years ago
Julian Lam 2ce6a85756 properly closes #6698 7 years ago
Julian Lam ed9dc113b0 sanitizing notes in flags details page, fixes #6698 7 years ago
Barış Soner Uşaklı b7f5995aab closes #6550 7 years ago
Julian Lam 7ba2ac9f69 Merge remote-tracking branch 'origin/master' into develop 7 years ago
Barış Soner Uşaklı bb13c4948d closes #6448 7 years ago
Barış Soner Uşaklı 0070f5c1b2 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 7 years ago
Julian Lam e8d4fe3209 Revert "closes #6380"
Turns out the issue was a malformed flag object, and not anything
code-wise

This reverts commit 956c5a2a32.
7 years ago
Julian Lam 956c5a2a32 closes #6380 7 years ago
Baris Usakli 29b7c67946 use utils.toISOString 7 years ago
Baris Usakli a48144e632 dont crash if description is numeric 7 years ago
Julian Lam a126f07471 closes #6043 7 years ago
Barış Soner Uşaklı 2983fc3e5e get group names first 7 years ago
Barış Soner Uşaklı bb9528b82e closes #6314 7 years ago
Barış Soner Uşaklı 7f67528280 change parallel to series in flag creation 7 years ago
Barış Soner Uşaklı 72140e5338 closes #5991, closes #5884 7 years ago
Baris Usakli a19537dc25 closes #6137 8 years ago
Barış Soner Uşaklı dd176dd5f2
Notification delivery (#6072)
* ability for users to choose how they receive notifications

add type field to more notifications, the type field is used to
determine what to do based on user
setting(none,notification,email,notificationemail)

* change var name to types

* cleanup

* add event types for privileged users

* remove unused language keys

* fix uids check

* changed if statements

* upgrade script to preserver old settings
8 years ago
Barış Soner Uşaklı 67bc58f04c wait for state to be updated 8 years ago
Peter Jaszkowiak e609e497b3 Provide more error information to logs
Provides full stack instead of just message
8 years ago
Peter Jaszkowiak 46fafb20b9 Remove string.js dependency 8 years ago
Julian Lam b44cfacda1 resolve XSS vulnerability in flags pages 8 years ago
Peter Jaszkowiak da9da8190f Bump dependencies
Bumping eslint & configs meant making some linting fixes

For future reference, the `xmlhttprequest-ssl` library must be of equal versioning to the one in `engine.io-client`, otherwise it won't be deduped which causes the socket.io tests to fail
8 years ago
Julian Lam 932b3f06a5 closes #5797 8 years ago
Julian Lam f4fb9ee04b adding filter hooks for flag list and retrieval 8 years ago
Peter Jaszkowiak 3c2d4fe649 Switch from underscore to lodash 8 years ago
Barış Soner Uşaklı 8e31ec7199 closes #5705 8 years ago
Barış Soner Uşaklı 3d1b1a9423 closes #5706 8 years ago
Barış Soner Uşaklı 8920523e06 more tests 8 years ago
Julian Lam 71137dbf43 pass reputation to flag reporter payload as well 8 years ago
Barış Soner Uşaklı 5a9b7b673a closes #5659 8 years ago
Barış Soner Uşaklı 5c005bbbdf use bind 8 years ago
Barış Soner Uşaklı 1b6d96dde7 on post flag increment zset 8 years ago
Julian Lam f2653cd380 broader error handling for empty notif creation return 8 years ago
Julian Lam c805d55b85 creating notification for flag assignment 8 years ago
barisusakli 5a2ff8ed0a closes #5527 8 years ago
Julian Lam 6e7b505ea7 more linting 8 years ago
Julian Lam ddea9f534e running eslint again 8 years ago
Julian Lam 10f270d016 adding byPid zset for flags 8 years ago
Julian Lam bef3da5b48 pass flagId into flag.update hook 8 years ago
Julian Lam 6c04e393b5 fire hooks for flag update 8 years ago
Julian Lam 541f51e947 restrict flags interface so that moderators only see flags from cids they can actually moderate 8 years ago
Julian Lam 283ae564f2 removing incorrect parseInt 8 years ago
Julian Lam babafde726 once more for good measure! 8 years ago
Julian Lam 2ea63f3d42 how much fun is it to fix tests when stack traces don't work? lots. :shipit: 8 years ago
Julian Lam ad633aad45 additional tests and proper handling for purged flag targets, #5232 8 years ago
Julian Lam 0927d54c98 ability to filter flags by cid, #5232, more tests 8 years ago
Julian Lam ebffc44600 fix tests, #5232 8 years ago
Julian Lam 831c2064a0 For #5232, added tests and returning flag data on socket flag creation 8 years ago
Julian Lam 0196997099 fixing issues as found by @barisusakli
re: #5232 and #5282
8 years ago
Julian Lam ebc9abd773 upgrade script and graphs for #5232 9 years ago
Julian Lam 6533fa066d removed unneeded fixes #5232 9 years ago
Julian Lam e40eb75f8f change history saving to append an object not a serialised array, #5232 9 years ago
Julian Lam a5fb4825b4 deprecating old hook for #5232 9 years ago
Julian Lam 5dd892bd01 a bunch of changes here... allowing user profiles to be flagged, #5232 9 years ago
Julian Lam 9f9051026b more work on #5232 9 years ago
Julian Lam 88958049eb added some more filters, and appending event to history on flag creation
issue #5232
9 years ago
Julian Lam 8e1d441e20 Added some quick filters, #5232 9 years ago
Julian Lam 753d4b0275 wrapped up basic functionality of list and detail for flags, filter support. #5232 9 years ago
Julian Lam 9129597811 #5232 some tweaks to flag history saving 9 years ago
Julian Lam 169defd194 #5232, update flag history to save new value 9 years ago
Julian Lam 0724bee6c6 removed deprecated dismiss methods 9 years ago
Julian Lam 20fa8ebf76 simplified flags.get a tad 9 years ago
Julian Lam f1d144f15e history appending, finished up notes, #5232 9 years ago
Julian Lam d9d60c20bd flag updating and note appending, #5232 9 years ago
Julian Lam 888c120e08 removed some unneeded methods for #5232 9 years ago
Julian Lam e9ff605a20 some more tests for #5232 9 years ago
Julian Lam c5c2d27180 flag assignees, state, notes WIP, #5232 9 years ago
Julian Lam fceb5cc86b more work on flags detail pages (#5232) 9 years ago
Julian Lam 9f7c4befea omg tests (#5232), and .create returns flag data now 9 years ago
Julian Lam 98a104564b some light refactoring, details API (#5232) 9 years ago
Julian Lam 640df0379e flag list page (#5232) 9 years ago
Julian Lam 106502952a fixed crash in flags page for now 9 years ago
Julian Lam 1aa70c57eb WIP 9 years ago