Commit Graph

2035 Commits

Author SHA1 Message Date
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
a25629bff9 fixes #3594 2018-04-11 11:14:58 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
a03270dbf1 Add about:userscripts to site map. 2018-04-05 16:52:46 -05:00
evazion
9b62b78183 Fix #3601: Broken URLs in /posts.atom feed. 2018-04-05 16:46:23 -05:00
evazion
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
evazion
f15f2cbb81 Fix #3581: Mod Dashboard: exclude or mark deleted comments. 2018-03-31 13:14:41 -05:00
Albert Yi
6c790c61d3 replace uploader information post previews and comment listing, rename tagger to top tagger 2018-03-27 10:49:41 -07:00
evazion
41a4ff15cd posts: remove unused file path / url methods.
* Remove file_path_for, cropped_file_url (dead code)
* Remove complete_preview_file_url (preview_file_url now returns absolute links)
* Remove `file_name` (only used for Download link in sidebar)
2018-03-20 19:49:55 -05:00
evazion
8a012d4c91 Remove unused mobile mode code (#3206).
Mobile mode was removed in 31e36cf.
2018-03-20 02:29:06 -05:00
r888888888
0c5dcbbf68 Revert "Revert "implement post keepers""
This reverts commit b9fcfe0442.
2018-03-06 18:04:31 -08:00
Albert Yi
1938319504 Merge pull request #3555 from evazion/fix-3554
#3554: Allow admins to edit BUR forum topic/post ids
2018-02-21 14:52:11 -08:00
evazion
962842815d autocomplete: move artist/pool/wiki autocompletion to autocomplete.js.
* Move all autocomplete code to autocomplete.js.

* Mark autocompleted fields with `data-autocomplete="<type>"` attributes,
  instead of hardcoding input field IDs in the javascript.
2018-02-18 19:22:17 -06:00
evazion
4bc5cc8ccd bulk update requests: allow admins to edit forum topic/post ids (#3554). 2018-02-18 13:08:53 -06:00
evazion
f07aa1b170 bulk update requests: convert to strong params. 2018-02-18 12:12:12 -06:00
Albert Yi
b9fcfe0442 Revert "implement post keepers" 2018-02-07 12:28:56 -08:00
Albert Yi
2e62916832 Merge pull request #3529 from r888888888/most-valued
implement post keepers
2018-02-07 12:10:38 -08:00
r888888888
308e3670df gracefully handle unavailable pg connection errors 2018-02-05 12:38:01 -08:00
r888888888
d10c6a3af7 display uploader for mods 2018-02-01 17:10:09 -08:00
r888888888
da2864e233 change keeper name to tagger 2018-02-01 17:07:30 -08:00
r888888888
32cc508edb hide uploader information on posts/show page, add keeper information 2018-02-01 14:38:03 -08:00
Albert Yi
dfd343f70e Merge pull request #3496 from BrokenEagle/feat-mod-action-event-ids
Add categories to mod actions
2018-01-15 11:09:38 -08:00
evazion
88f4a56890 Fix #3497: Invalid DText denial of service attack. 2018-01-14 16:14:18 -06:00
BrokenEagle
fcdc61f111 Add search interface for mod actions 2018-01-14 00:07:16 -08:00
BrokenEagle
2e6f216e10 Fix spacing issues on versions
- Removed pipe character '|' on post version standard listing
2018-01-02 22:50:25 -08:00
r888888888
a8c4179083 fix html class in uploads/new 2018-01-02 15:34:43 -08:00
Albert Yi
ed948ad655 Merge pull request #3486 from BrokenEagle/fix-version-index-revert
Differentiate version index views with reversion links
2018-01-02 12:36:45 -08:00
Albert Yi
927b2f00a2 Merge pull request #3485 from evazion/fix-3484
Fix #3484: /posts: don't show wiki tab for metatags
2018-01-02 10:45:06 -08:00
Albert Yi
99c0c4ade6 Merge pull request #3479 from BrokenEagle/feat-add-iqdb-page
Initial add of IQDB standalone page
2018-01-02 10:29:27 -08:00
BrokenEagle
613beee375 Differentiate version views with reversion links 2018-01-01 19:36:27 -08:00
evazion
f9ffa2b47a Fix #3484: /posts: don't show wiki tab for metatags. 2017-12-31 12:25:17 -06:00
BrokenEagle
36ef8b4db3 Initial add of IQDB standalone page 2017-12-30 00:11:08 -08:00
Albert Yi
00f091ef3e Merge pull request #3478 from BrokenEagle/fix-post-replacement-autocomplete
Add autocomplete to tags input on post replacements
2017-12-29 15:53:14 -08:00
BrokenEagle
5d317c19dd Add autocomplete to tags input on post replacements 2017-12-28 12:41:03 -08:00
Albert Yi
b315ee25bc Merge pull request #3471 from BrokenEagle/fix-controller-views
Various fixes for controller views
2017-12-28 11:18:44 -08:00
BrokenEagle
71e05e8502 Fix nonworking forum_post/new when no topic ID is specified 2017-12-28 10:21:03 -08:00
BrokenEagle
5cdd8d8f67 Standardize position of page title and secondary links
- Removed path specification for secondary links where unneeded
2017-12-28 10:20:27 -08:00
BrokenEagle
31d3215dad Fix page controller and action IDs
- Also fix affected CSS and JS files
2017-12-28 10:20:12 -08:00
r888888888
c757cdeb12 fix text on mod random queue 2017-12-27 10:52:25 -08:00
r888888888
f11c731e32 fixes #3461 2017-12-27 10:51:17 -08:00
r888888888
659eb62402 css tweaks 2017-12-26 16:06:16 -08:00
Albert Yi
2e0e8e1365 Merge pull request #3456 from BrokenEagle/fix-3455
Fix 3455: Convert tag category Javascript/CSS assets to ERB
2017-12-25 13:22:04 -08:00
BrokenEagle
d54b26c61d Convert tag category Javascript/CSS assets to ERB 2017-12-24 17:01:17 -08:00
evazion
0d69c03249 Fix "undefined method `is_builder?' for nil:NilClass" in static/error.html.erb.
`CurrentUser.user` may be nil if an exception is raised before it's
initialized.
2017-12-23 18:27:04 -06:00
evazion
5f1b7da95d Fix "RuntimeError: can't modify frozen String" in static/error.html.erb.
Fixes a frequently occurring error in New Relic.
2017-12-23 18:23:41 -06:00
evazion
806513836b Fix failbooru in /users/custom_style.css when custom_style is nil.
http://danbooru.donmai.us/users/custom_style.css failed when manually
requested by anonymous users, or by users who didn't have a style set.
2017-12-23 11:11:50 -06:00
Albert Yi
7af5b133c4 Merge branch 'master' into feat-public-favgroups 2017-12-19 15:42:56 -08:00
BrokenEagle
5a602c60eb Added option to make favorite groups public 2017-12-18 17:30:02 -08:00
evazion
e6acd6f2d6 /post_replacements: list old and new md5 and image sizes. 2017-12-18 18:03:03 -06:00
evazion
49577e3fac /static/bookmarklet: add note using bookmarklet on Twitter with Firefox.
In Firefox, to use the bookmarklet on Twitter you must install version
1.1.3 of the Bookmarklets Context Menu addon. See https://danbooru.donmai.us/forum_topics/14794.
2017-12-16 12:59:02 -06:00