Commit Graph

128 Commits

Author SHA1 Message Date
Azareal cff2e96915 add Count() method to PollStore
show daily task count on debug page
optimise count queries on debug page
use Count() methods on debug page where ever possible
2021-05-04 21:14:48 +10:00
Azareal fc5b29e648 Add TickLoop struct.
Add a number of new test cases and refactor others.
Replace NotifyOne() with ActivityMatches.Add()
Shorten arr_ to a_ in tmpl_list.go
Reduce boilerplate.
2021-05-02 18:47:19 +10:00
Azareal cbee05fd3e enable forum actions
add more forum action test cases
shorten variable names
2021-04-08 10:14:24 +10:00
Azareal c60118e7c4 WIP forum action code. Currently disabled.
Add Http Conn Count tracking.
Move more panel phrases into the panel namespace.
Use a string builder in hookgen.
Use Countf() in a couple of places to eliminate boilerplate.
Reduce prepared stmt boilerplate in forum store with a lambda.
Reduce prepared stmt boilerplate in topic.go with a lambda.
Reduce prepared stmt boilerplate in group.go with a lambda.
Add TestSetCreatedAt method to *Topic.
Add DateOlderThanQ method to *accDeleteBuilder and *accUpdateBuilder.
Add Stmt method to *accUpdateBuilder and *AccSelectBuilder.
Add AccBuilder interface.
Shorten variable names.
Shorten extractPerm name to ep.
Add avatar_visibility setting stub. Implementation coming in a later commit.
Don't set an IP for installer generated posts.

Add counters_perf_tick_row hook.

Add avatar_visibility phrase.
Add avatar_visibility_label phrase.
Rename forums_no_description to forums_no_desc.
Rename panel.forums_create_description_label to panel.forums_create_desc_label.
Rename panel.forums_create_description to panel.forums_create_desc.
Rename panel_forum_description to panel.forum_desc.
Rename panel_forum_description_placeholder to panel.forum_desc_placeholder.
Add panel_debug_http_conns_label phrase.
Add panel.forum_actions_head phrase.
Add panel.forum_actions_create_head phrase.
Add panel.forum_action_run_on_topic_creation phrase.
Add panel.forum_action_run_days_after_topic_creation phrase.
Add panel.forum_action_run_days_after_topic_last_reply phrase.
Add panel.forum_action_action phrase.
Add panel.forum_action_action_delete phrase.
Add panel.forum_action_action_lock phrase.
Add panel.forum_action_action_unlock phrase.
Add panel.forum_action_action_move phrase.
Add panel.forum_action_extra phrase.
Add panel.forum_action_create_button phrase.

You will need to run the patcher / updater for this commit.
2021-04-08 00:23:11 +10:00
Azareal f6a94d39d6 Set the metadata for the last reply rather than the first in a topic when a reply is deleted.
Add tests to check the LastReplyID for a topic before and after a reply is deleted.
2021-03-25 19:04:02 +10:00
Azareal 6446a1fa4c Add LastReplyID, simple LastReplyAt, and LastReplyBy topic reply tests.
Simplify state tracking in testReplyStore by using a fresh topic on each call.
Avoid repeating the TID so much in topic reply tests.
2021-03-25 07:39:27 +10:00
Azareal c1343136c6 Update Topic.LastReplyID properly. 2021-03-25 06:01:40 +10:00
Azareal 335c1f96c4 Shorten expect to ex and expectf to exf in tests.
Reduce boilerplate in tests in other ways like a heavier use of first order functions.
Add missing AdminOnly tests in TestPermsMiddleware.
Add preliminary test of LastTopicID, TopicCount, and LastPage for topic creation on forums.
Fix FPStore check in anonymous function in TestForumPermsStore.
Test forum perm changes against specific groups and the ViewForum route.
Add alert deletion test.
Add preliminary topic list test cases.
benchmark things
2021-03-24 22:48:36 +10:00
Azareal 4126e8ed0c add qwant, xenforo, twingly, linkfluence, and new toutiao user agent.
add Users.CountSearch test cases.
add Users.SearchOffset test cases.
add more Users.Count test cases.
add more Users.BulkGetByName test cases.
reduce boilerplate in other tests.
fix bugs in Users.CountSearch and Users.BulkGetByName
2021-03-02 17:22:32 +10:00
Azareal 301e7c6bea Add initial test cases for GetByName and BulkGetByName.
Eliminate boilerplate with expectf.
2021-02-28 12:23:05 +10:00
Azareal f20b0bd936 Add BulkIsBlockedBy method to BlockStore.
Add TotalP to accCountBuilder.
Add EachP to AccSelectBuilder.
Add expectf.
Add more conversation test cases.
Refactor conversation tests.
Add block tests.
2021-02-27 16:13:03 +10:00
Azareal 5bfc5e3e40 unit tests for profile comment visibility 2020-07-15 16:59:47 +10:00
Azareal ae83a1c701 update brotli and mssql deps
add a couple more canonemail test cases
2020-06-23 06:26:10 +10:00
Azareal 3efd887b1a cover common mutations of literal definitions
add seven char weak password definitions to take advantage of mutations
avoid majority of the weak password logic for really long passwords
2020-06-18 13:37:05 +10:00
Azareal 08d5e2e0d8 add more weak password definitions
move the weak password logic to it's own file
add another weak password test case and split the test function
2020-06-18 12:39:21 +10:00
Azareal f0c9544af6 make it easier to define weak password definitions
add tests for weak passwords
make it easier to check values of errors returned from weak password
loosen weak password requirements for long passwords
reduce boilerplate when loading json files
only check for email in passwords when it is longer than two chars
more canonemail tests
2020-06-18 08:03:36 +10:00
Azareal bb0f6be91c canonalize emails properly
shorten var names
2020-06-16 12:07:21 +10:00
Azareal 814eac5a95 comment out this test for now 2020-05-27 10:15:46 +10:00
Azareal 5a9e0c72d3 try to optimise DefaultLikeStore.BulkExists
initial like tests
2020-04-10 11:32:02 +10:00
Azareal d920fe0a86 test mfa auth against it's own generated token 2020-04-03 08:57:46 +10:00
Azareal 8b059ac877 other mfa store tests
save a few bytes
2020-04-03 08:24:32 +10:00
Azareal 1fe51768f0 initial mfa tests
save a few bytes
2020-04-03 06:19:42 +10:00
Azareal 581f86eeba shorten ucache to uc in misc test
shorten a few bits of html
2020-04-02 17:39:49 +10:00
Azareal b66a494f1c Revert "Revert "will a pointer make this faster...?""
This reverts commit 501bcc2425.
2020-03-18 19:21:34 +10:00
Azareal 501bcc2425 Revert "will a pointer make this faster...?"
This reverts commit 8e414486b8.
2020-03-15 21:34:57 +10:00
Azareal 8e414486b8 will a pointer make this faster...? 2020-03-15 17:06:44 +10:00
Azareal 42a95d8597 initial Paginate() tests 2020-03-09 11:37:31 +10:00
Azareal 24cef43439 fix search not working properly
fix missing title index properly
add search tests
roll back accidental duplicate indices

You will need to run the updater / patcher for this commit.
2020-02-21 21:42:21 +10:00
Azareal d723895f5d remove polls from poll cache on deletion
add test for poll castvote and delete
2020-02-20 21:28:49 +10:00
Azareal 167a0edba3 add topic and attach moveto tests 2020-02-20 20:57:50 +10:00
Azareal eec52551ba initial poll store tests 2020-02-20 15:36:54 +10:00
Azareal 887804ff54 fix attachcount not being updated properly when attachments are deleted
tests for attachcount changes

add fget method to attachmentstore
2020-02-20 14:32:49 +10:00
Azareal 1766d5decd more attachment tests
Add UpdateLinked method to AttachmentStore.
2020-02-19 20:32:26 +10:00
Azareal 8d38926863 deletion attachment tests 2020-02-19 18:07:59 +10:00
Azareal e351de0266 initial attachment tests 2020-02-19 15:12:59 +10:00
Azareal 84cdc097e7 Add UseConvosOnlyWithMod group permission.
Add UseConvosOnlyWithMod phrase.
Add initial convo tests.
Bar access to ConvosCreate route if we don't have the needed perms.
2020-02-11 13:13:38 +10:00
Azareal b6931fe16a Add registered time as a parameter for group promotions.
Run group promotions on group change.
Run group promotions on registration.
Load the CreatedAt field when users are loaded.
Set the default for last_ip properly.
Fix the default values in the group promotion form.
Add initial group promotion tests.

Add panel_group_promotion_registered_for phrase.
Add the registeredFor column to the users_groups_promotions table.

You will need to run the updater / patcher for this commit.
2020-02-09 20:00:08 +10:00
Azareal 0c1d6f0516 Add CreateProfileReply and AutoEmbed group permissions.
Log profile reply deletions in the moderator log.
Split the global permissions in the UI to make them easier to manage.
Experiment with showing group ID in group edit header.
Avoid loading groups multiple times for the same profile reply.

Initialise disabled IP log points to empty string rather than 0.

Add CreateProfileReply perm phrase.
Add AutoEmbed perm phrase.
Add panel_group_mod_permissions phrase.
Add panel_logs_mod_action_profile_reply_delete phrase.
2020-02-04 21:47:03 +10:00
Azareal 6935637867 Cascade delete attachments properly.
Cascade delete replied to topic events for replies properly.
Cascade delete likes on topic posts properly.
Cascade delete replies and their children properly.
Recalculate user stats properly when items are deleted.
Users can now unlike topic opening posts.
Add a recalculator to fix abnormalities across upgrades.
Try fixing a last_ip daily update bug.

Add Existable interface.
Add Delete method to LikeStore.
Add Each, Exists, Create, CountUser, CountMegaUser and CountBigUser methods to ReplyStore.
Add CountUser, CountMegaUser, CountBigUser methods to TopicStore.
Add Each method to UserStore.
Add Add, Delete and DeleteResource methods to SubscriptionStore.
Add Delete, DeleteByParams, DeleteByParamsExtra and AidsByParamsExtra methods to ActivityStream.
Add Exists method to ProfileReplyStore.

Add DropColumn, RenameColumn and ChangeColumn to the database adapters.

Shorten ipaddress column names to ip.
- topics table.
- replies table
- users_replies table.
- polls_votes table.
Add extra column to activity_stream table.
Fix an issue upgrading sites to MariaDB 10.3 from older versions of Gosora. Please report any other issues you find.

You need to run the updater / patcher for this commit.
2020-01-31 17:22:08 +10:00
Azareal a569772e9c Add DisableRegLog configuration setting.
Unit tests for DisablePostIP. Awkward but does the job for now.
2020-01-04 15:30:25 +10:00
Azareal b39d90e4b6 Add DisablePostIP configuration setting. 2020-01-03 07:52:41 +10:00
Azareal 1044518e74 Finish up the adminlogs.
Throw an error instead of updating a word filter that doesn't exist.
Track a bit of extra data for word filter updates.

Shorten the prefixes of the adminlog phrases from panel_logs_administration_ to panel_logs_admin_
Add a bunch of new adminlog phrases.
Tweak the word filter phrases.

Add the extra column to the moderation_logs and administration_logs tables.

You need to run the updater / patcher for this commit.
2019-11-10 12:37:53 +10:00
Azareal d03c0faf42 Add custom page tests and more word filter tests. 2019-11-09 12:34:12 +10:00
Azareal 2fb15556e1 More word filter tests.
Fix WordFilters.Get.
2019-11-09 08:07:05 +10:00
Azareal a5f77c376b Users can now delete their own posts.
Merge GlobalPerms and LocalPerms phrase spaces into Perms.
Shorten more things and eliminate boilerplate.
2019-10-06 21:32:00 +10:00
Azareal 8d40139ae5 Tests are green now.
Recognise localhost equivalents in the parser.
Add rel=ugc to the bbcode parser too.
More shortening and boilerplate eliminating.
Fix a potential lock bug.
2019-10-06 11:49:31 +10:00
Azareal 592f5614ea Tweak this test as it seems to be running into some weird undefined behavior. 2019-10-06 10:43:51 +10:00
Azareal 5705252029 Add UseConvos permission.
Use UseConvos permission instead of ban flags in convo perm checks.
Stop users without the UseConvos permission from editing convo replies, although they can still delete them for privacy reasons.

Shorten some things and reduce the amount of boilerplate.
Add a few misc parser test cases.
Fix footer and tweak indentation.
2019-10-06 10:34:09 +10:00
Azareal f1bebb7326 Shorten the names of the IP fields.
Shorten some other things.
2019-09-01 08:34:43 +10:00
Azareal 8cf9badd46 Remove inline CSS for log pages.
Darken links on hover in Nox.
Add another group.CanSee test.
2019-06-28 09:35:34 +10:00