Commit Graph

228 Commits

Author SHA1 Message Date
evazion
3e3844a796 Remove unused tag subscription code (#2956, #3206). 2017-07-13 13:44:26 -05:00
evazion
ef1db967f7 /dmails: allow banned users to read/delete dmails. 2017-07-06 18:39:42 -05:00
evazion
cda1ee3d88 /users: allow banned users to edit account settings.
The member_only check prevents banned users from editing their account
settings. This isn't needed since check_privilege handles the privilege check.
2017-07-06 18:39:42 -05:00
evazion
cc54c16fac /artists/show_or_new: make public; add "artist doesn't exist" page.
* Fix access denied error when anonymous users open /artists/show_or_new.

* When the artist doesn't exist, take user to "artist doesn't exist"
  page instead of redirecting to /artists/new.
2017-07-06 18:37:13 -05:00
evazion
5a2745ee71 Fix post replacement controller test.
Broken in 27aa9fe. Delayed jobs have to be enabled when creating a
replacement, otherwise replacement will try to immediately delete the
existing files, which fails because they're still in use.
2017-07-01 13:37:32 -05:00
evazion
1d62ea3220 /forum_topics: don't list stickies first in json/atom responses. 2017-06-04 16:14:55 -05:00
Albert Yi
2f1faf3c38 Merge pull request #3060 from evazion/fix-3048
Fix #3048: Artist Lookup Failing Due to Changing Usernames
2017-05-15 16:33:53 -07:00
Albert Yi
6ddf0821d8 Merge pull request #3055 from evazion/feat-post-replacement-controller
Add post replacements controller.
2017-05-15 16:19:34 -07:00
Albert Yi
79484586cd Merge branch 'master' into fix-forum-topic-visits 2017-05-15 16:10:21 -07:00
evazion
eac827973b Normalize pixiv artist urls to pixiv member page (fix #3048). 2017-05-15 14:12:08 -05:00
evazion
9b73823ccd Add post replacement create action test. 2017-05-14 21:31:12 -05:00
evazion
cb09b6661d Add /post_replacements.json, /posts/1234/replacements.json. 2017-05-14 18:49:57 -05:00
evazion
71a19c28f1 forum topics: don't record a topic visit for api requests. 2017-05-13 13:50:20 -05:00
evazion
8c88e87710 /forum_topics.atom: add atom feed for forum topics. 2017-05-13 10:37:59 -05:00
evazion
e68946e95d /comments.atom: add atom feed for comments. 2017-05-13 10:37:58 -05:00
Albert Yi
b4051526ff Merge pull request #3025 from evazion/fix-xml-attrs
Fix #3024: strip '?' from API attributes
2017-05-08 12:59:57 -07:00
evazion
19e91f438b bans: add test for logging in with expired ban. 2017-05-07 12:13:25 -05:00
evazion
7b5ae5f8e0 Fix #3024: strip '?' from API attributes. 2017-05-04 12:19:51 -05:00
evazion
f7509433b1 /users.json: make private attributes visible to the user themselves (fix #1551). 2017-04-29 12:26:24 -05:00
evazion
30872ebb41 Fix #2990: Wiki Autocomplete Misses On Certain Meta-wikis
/wiki_pages?search[order]=post_count didn't include wiki pages that
didn't belong to a tag. This was due to doing an inner join on the tags
table instead of a left outer join.
2017-04-23 16:55:15 -05:00
r888888888
68f057e7ba refactor how artist notes are updated 2017-04-18 17:07:12 -07:00
Albert Yi
42f6e8dc48 Merge pull request #2976 from evazion/fix-tests
Fix failing Pixiv tests
2017-04-17 13:09:32 -07:00
evazion
c0e5c400a7 tests: fix tests for Rails.cache. 2017-04-16 16:48:36 -05:00
evazion
b68cb174f5 tests: fix pixiv tests to use https://i.pixiv.net. 2017-04-15 23:14:41 -05:00
evazion
1b572c592c wikis: disallow renaming unless tag is empty (fix #2964). 2017-04-10 16:40:42 -05:00
evazion
2d2efbddfe /iqdb_queries: add api test. 2017-04-05 18:48:57 -05:00
r888888888
0b8d4105aa fix tests 2017-04-04 12:39:17 -07:00
evazion
47ecf034a7 /posts/:id/events - fix exception when viewed by mod.
NoMethodError exception raised

    undefined method `creator' for #<PostEvent:0x007f9a298e64d8> Did you mean? creator_id
    app/views/post_events/index.html.erb:23:in `block in _app_views_post_events_index_html_erb__2088986421112502721_70150054247640'
    app/views/post_events/index.html.erb:18:in `each'
    app/views/post_events/index.html.erb:18:in `_app_views_post_events_index_html_erb__2088986421112502721_70150054247640'
    app/controllers/post_events_controller.rb:6:in `index'
2017-03-21 17:17:18 -05:00
evazion
5ba1df5502 /posts/:id/events: list is_resolved correctly for appeals.
/posts/:id/events incorrectly lists appeals as always being resolved.
This is because events UNION together appeals and flags, which doesn't
quite work because for appeals is_resolved is a method, not an
attribute. is_resolved was hardcoded to true so it'd work in the UNION.

This changes PostEvent to be a wrapper object around PostFlag /
PostAppeal, instead of a UNION. PostEvent delegates everything to the
inner flag/appeals object, so that is_resolved works correctly.

Also, this incidentally fixes a problem with /posts/:id/event.xml not
serializing correctly.
2017-03-19 22:47:10 -05:00
r888888888
d9a26975ba fix tests 2017-03-15 16:08:47 -07:00
r888888888
398f58684f Merge branch 'post-archive' 2017-02-27 10:45:13 -08:00
evazion
d852f98e4f /dmails: remove unused search[owner_id] param.
/dmails is restricted to viewing dmails for CurrentUser only (due to
Dmail.visible in the index action). Remove owner_id from subnavbar links
in /dmails, and don't support it in /dmails?search[owner_id], since it
doesn't actually do anything.

Also removes related dead methods and fixes tests that didn't test owner_id properly.
2017-02-23 22:51:17 -06:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
r888888888
6c9d5e4f9a remove advertisement code 2017-02-21 13:35:22 -08:00
r888888888
291e9acdc7 fixes #2885: "Is Deleted" not being recorded correctly for Wiki Page Versions 2017-02-15 15:32:41 -08:00
evazion
cac5eae3c4 tests: add more tags controller/model tests. 2017-02-06 18:48:39 -06:00
evazion
2b4c722bd1 tests: add more notes controller tests. 2017-02-06 18:48:38 -06:00
evazion
0890c6320b tests: add more comments controller tests. 2017-02-06 18:48:38 -06:00
evazion
73e274b2e0 tests: add more moderator/post/queues controller tests. 2017-02-06 18:48:38 -06:00
evazion
a120a63d3b tests: add more moderator/post/posts controller tests. 2017-02-06 18:48:38 -06:00
evazion
cdafbc849d tests: add more artist commentary controller tests. 2017-02-06 18:48:38 -06:00
evazion
2d62fff89b tests: add more wiki page versions controller tests. 2017-02-06 18:48:37 -06:00
evazion
43591e0c2d tests: add more wiki pages controller tests. 2017-02-06 18:48:37 -06:00
evazion
5c871aee64 tests: add more pools controller tests. 2017-02-06 18:48:37 -06:00
evazion
dfb8d0106d tests: add more posts controller tests. 2017-02-06 18:48:37 -06:00
evazion
09ffac07ea tests: add more users controller tests. 2017-02-06 18:48:37 -06:00
evazion
3edd814be5 tests: add iqdb queries controller tests. 2017-02-06 18:48:37 -06:00
evazion
e26fb61ee9 tests: add explore/posts controller tests. 2017-02-06 18:48:36 -06:00
evazion
443c41cff2 tests: add meta searches controller tests. 2017-02-06 18:48:36 -06:00
evazion
30c3a52187 tests: add mod actions controller test. 2017-02-06 18:48:36 -06:00