about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
AgeCommit message (Collapse)Author
2020-02-21port tootsuite#11292 to monsterfork: Add whitelist modeEugen Rochko
2020-02-21port tootsuite#11375: Change unconfirmed user login behaviourEugen Rochko
Allow access to account settings, 2FA, authorized applications, and account deletions to unconfirmed and pending users, as well as users who had their accounts disabled. Suspended users cannot update their e-mail or password or delete their account. Display account status on account settings page, for example, when an account is frozen, limited, unconfirmed or pending review. After sign up, login users straight away and show a simple page that tells them the status of their account with links to account settings and logout, to reduce onboarding friction and allow users to correct wrongly typed e-mail addresses. Move the final sign-up step of SSO integrations to be the same as above to reduce code duplication.
2020-02-21Fix 422 being returned instead of 404 when POSTing (#11574)Eugen Rochko
2020-02-21port tootsuite#11702 to monsterfork: Fix uncaught parameter missing ↵Eugen Rochko
exceptions and missing error templates
2020-02-21port tootsuite#11770 to monsterfork: Add healthcheck endpoint for webYamagishi Kazutoshi
2020-02-21Fix HTML error pages being returned when JSON is expected (#12713)Eugen Rochko
Fix #12509 See also #12214
2020-02-21port tootsuite#12593 to monsterfork: Fix missing error templates for ↵Eugen Rochko
non-HTML requests
2020-02-21port tootsuite#8657: Change locale detection to run once per sessionEugen Rochko
Fix #6462
2020-02-20port tootsuite#11333 to monsterfork: Add (back) rails-level JSON cachingEugen Rochko
2020-02-18switch to irc-like oper behavior; require mods & admins to explicitly oper ↵multiple creatures
up using `fangs`/`op` bangtag or toggling defang setting in profile; auto-defang after 15 mins or with `defang`/`deop` bangtag
2020-02-14add admin option to toggle auto-marking instance actors known & make ↵multiple creatures
enabling greylist federation also enable secure mode
2020-01-20Original upstream mergeThibG
2020-01-17Port render_with_cache, CacheConcern from upstreamHolly "Frinkeldoodle" Lotor
2020-01-15port new application controller error handlers from upstreammultiple creatures
2020-01-11move `monsterpit_api` helper to the application controllermultiple creatures
2019-11-19Cleanup various controllers (#10972)ThibG
* Remove skip_session! as it is not supported in Rails 5 * Minor cleanup in StreamEntriesController * Remove redundant mark_cacheable! calls
2019-03-18Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/accounts_controller.rb - app/controllers/follower_accounts_controller.rb - app/controllers/statuses_controller.rb All conflicts caused by the additional `use_pack` used for glitch-soc's theming system.
2019-03-17Reduce server load caused by anonymous viewing. (#9059)Ben Lubar
Do not start a session if the current user is not logged in for public-facing pages. Mark pages that don't care about sessions as publicly cacheable. Keep the max age as 0 so proxies and browsers will still try to retrieve an updated version but can still fall back to the stale version if the site is down or too slow. Fixes #9035.
2018-11-27Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/models/status.rb Resolved by taking both changes (not a real conflict, just changes too close to each other).
2018-11-16Remove intermediary arrays when creating hash maps from results (#9291)Eugen Rochko
2018-10-28Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2018-10-28Include preview cards in status entity in REST API (#9120)Eugen Rochko
* Include preview cards in status entity in REST API * Display preview card in-stream * Improve in-stream display of preview cards
2018-09-11Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: app/controllers/oauth/authorizations_controller.rb Just two changes being too close to one another. Took both.
2018-09-09Add force_login option to OAuth authorize page (#8655)Eugen Rochko
* Add force_login option to OAuth authorize page For when a user needs to sign into an app from multiple accounts on the same server * When logging out from modal header, redirect back after re-login
2018-08-24Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: app/controllers/application_controller.rb Changed instance theme selection by instance flavour selection.
2018-08-23Allow mods to disable login, improve message when login disabled (#8329)Eugen Rochko
* Allow moderators to disable/enable login * Instead of rejecting login, show forbidden error when login disabled Avoid confusion because when login is rejected, the message is that the account is not activated, which is wrong. * Fix tests
2018-08-23Add ability to change an instance default theme from the administration ↵Jakub Mendyk
panel (#7092) (#8381) * Add default_settings class method to ScopedSettings ScopedSettings was extended to use value of unscoped setting instead of only using defaults set in config/settings.yml for selected settings. This adds possibility for admins to set default values of users' settings, for example default theme (as requested in #7092). * Add ability to change an instance default theme Closes #7092
2018-08-21Merge branch 'master' into glitch-soc/masterThibaut Girka
Conflicts: config/routes.rb Added the “endorsements” route from upstream.
2018-08-19Unuse ActiveRecord::Base#cache_key (#8185)abcang
* Unuse ActiveRecord::Base#cache_key * Enable cache_versioning * Call cache_collection
2018-05-27Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: config/locales/ca.yml config/locales/nl.yml config/locales/oc.yml config/locales/pt-BR.yml Resolved conflicts by removing upstream-specific changes
2018-05-26Catch ActionController::UnknownFormat and return HTTP 406 (#7621)Eugen Rochko
An error like that should not appear in production error log.
2018-05-11Merge branch 'master' into glitch-soc/mergeThibaut Girka
Conflicts: app/controllers/invites_controller.rb app/serializers/initial_state_serializer.rb config/locales/ko.yml
2018-05-11Update session activation time (fixes #5605) (#7408)ThibG
2018-04-03Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-04-03Improve require_admin! and require_staff! filters (#7018)Emelia Smith
Previously these returns 302 redirects instead of 403s, which meant posting links to admin pages in slack caused them to unfurl, rather than stay as a link. Additionally, require_admin! doesn't appear to be actively used, on require_staff!
2018-03-02Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: README.md app/controllers/follower_accounts_controller.rb app/controllers/following_accounts_controller.rb app/serializers/rest/instance_serializer.rb app/views/stream_entries/_simple_status.html.haml config/locales/simple_form.ja.yml
2018-02-28Fix #942: Seamless LDAP login (#6556)Eugen Rochko
2018-02-23Merge branch 'master' of https://github.com/tootsuite/mastodonimncls
# Conflicts: # app/controllers/settings/exports_controller.rb # app/models/media_attachment.rb # app/models/status.rb # app/views/about/show.html.haml # docker_entrypoint.sh # spec/views/about/show.html.haml_spec.rb
2018-02-22Fix #6526: Only store redirect location if not in JSON format (#6528)Eugen Rochko
2018-02-02Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss
2018-02-02pam authentication (#5303)Alexander
* add pam support, without extra column * bugfixes for pam login * document options * fix code style * fix codestyle * fix tests * don't call remember_me without password * fix codestyle * improve checks for pam usage (should fix tests) * fix remember_me part 1 * add remember_token column because :rememberable requires either a password or this column. * migrate db for remember_token * move pam_authentication to the right place, fix logic bug in edit.html.haml * fix tests * fix pam authentication, improve username lookup, add comment * valid? is sometimes not honored, return nil instead trying to authenticate with pam * update devise_pam_authenticatable2 and adjust code. Fixes sideeffects observed in tests * update devise_pam_authenticatable gem, fixes for codeconventions, fix finding user * codeconvention fixes * code convention fixes * fix idention * update dependency, explicit conflict check * fix disabled password updates if in pam mode * fix check password if password is present, fix templates * block registration if account is maintained by pam * Revert "block registration if account is maintained by pam" This reverts commit 8e7a083d650240b6fac414926744b4b90b435f20. * fix identation error introduced by rebase * block usernames maintained by pam * document pam settings better * fix code style
2018-01-07Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-masterDavid Yip
2018-01-07Use error pack when rendering error pages. Fixes #305.David Yip
2018-01-07Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-07Fix force_ssl conditional (#6201)Yamagishi Kazutoshi
2018-01-07Fix unintended cache (#6214)Yamagishi Kazutoshi
2018-01-07Merge remote-tracking branch 'ykzts/fix-unintended-cache' into gs-masterDavid Yip
2018-01-07Fix unintended cacheYamagishi Kazutoshi
2018-01-04Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-01-04Make sure private toots remain private and do not end up in HTTP caches (#6175)ThibG