about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
AgeCommit message (Collapse)Author
2018-01-04Cache JSON of immutable ActivityPub representations (#6171)Eugen Rochko
2017-12-30Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: app/controllers/auth/confirmations_controller.rb
2017-12-29Add more instance stats APIs (#6125)Eugen Rochko
* Add GET /api/v1/instance/peers API to reveal known domains * Add GET /api/v1/instance/activity API * Make new APIs disableable, exclude private statuses from activity stats * Fix code style issue * Fix week timestamps
2017-12-10Javascript intl8n flavour supportkibigo!
2017-12-07Skins shouldn't apply to fallback flavourskibigo!
2017-12-06Fix common packs when other pack also therekibigo!
2017-12-03Rename themes -> flavours ? ?kibigo!
2017-11-30Skins supportkibigo!
2017-11-20Finalized theme loading and stuffkibigo!
2017-11-16Themed prefetchingkibigo!
2017-11-17Fix some rubocop style issues (#5730)Eugen Rochko
2017-11-11Add moderator role and add pundit policies for admin actions (#5635)Eugen Rochko
* Add moderator role and add pundit policies for admin actions * Add rake task for turning user into mod and revoking it again * Fix handling of unauthorized exception * Deliver new report e-mails to staff, not just admins * Add promote/demote to admin UI, hide some actions conditionally * Fix unused i18n
2017-09-19Add support for multiple themes (#4959)Andrew
* Add support for selecting a theme * Fix codeclimate issues * Look up site default style if current user is not available due to e.g. not being logged in * Remove outdated comment in common.js * Address requested changes in themes PR * Fix codeclimate issues * Explicitly check current_account in application controller and only check theme availability if non-nil * codeclimate * explicit precedence with && * Fix code style in application_controller according to @nightpool's suggestion, use default style in embedded.html.haml * codeclimate: indentation + return
2017-08-05Add "signed in as" header to some pages (#4523)Eugen Rochko
2017-07-07Fix #4058 - Use a long-lived cookie to keep track of user-level sessions (#4091)Eugen Rochko
* Fix #4058 - Use a long-lived cookie to keep track of user-level sessions * Fix tests, smooth migrate from previous session-based identifier
2017-06-25Bind web UI access tokens to sessions (#3940)Eugen Rochko
* Add overview of active sessions * Better display of browser/platform name * Improve how browser information is stored and displayed for sessions overview * Fix test * Fix #2347 - Bind web UI access token to session When you logout, session also destroys the access token, so it's no longer valid. If access token is destroyed some other way, the session is also destroyed, requiring a re-login. Fix #1681 - Add scheduler to remove revoked access tokens and grants * Fix test
2017-05-24Show error message to suspended user (#3281)Yamagishi Kazutoshi
2017-05-22Change "Account.any?" to "Account.exists?" (#3217)Yamagishi Kazutoshi
2017-05-22single_user_mode? always returns boolean (#3215)Akihiko Odaki
This change also adds a specification for the method.
2017-05-01Error responses cleanup (#2692)Matt Jankowski
* Use respond_with_error for forbidden errors * Wrap up common error code into single method
2017-04-30Extract user tracking into concern (#2600)Matt Jankowski
2017-04-25Localize with i18n for Devise::FailureApp (#2309)alpaca-tc
This PR fixes I18n.locale for rake middlewares. Mastodon uses Devise that depends on Warden. Warden::Manager can be found in rake middleware. It is outside of the controller. In the case of authentication failed, warden calls throw(:warden). At the time Warden::Manager delegates request to failure_app to generate response and flash[:alert] after catching it. Unfortunately, I18n.locale is already reset then because I18n.with_locale is enabled only inside the controller. If we used I18n.locale=, Devise::FailureApp could get the current locale.
2017-04-24Return force_ssl to the controller (#2380)Matt Jankowski
2017-04-23ActivityPub: Add basic, read-only support for Outboxes, Notes, and ↵Evan Minto
Create/Announce Activities (#2197) * Clean up collapsible components * Expose user Outboxes and AS2 representations of statuses * Save work thus far. * Fix bad merge. * Save my work * Clean up pagination. * First test working. * Add tests. * Add Forbidden error template. * Revert yarn.lock changes. * Fix code style deviations and use localized instead of hardcoded English text.
2017-04-23Move force_ssl check to production config (#2165)Matt Jankowski
The force_ssl method from controllers does not add all of the options that the sitewide configuration in a config block does. For example, HSTS enforcement is not added by the controller method, but is added by this style.
2017-04-21Fix #2195 - Set locale to error pages (#2255)Takayoshi Nishida
* Fix #2195 - Set locale to error pages * Fix #2195 - Cut duplicate process into one method
2017-04-16Make file attachment on MediaAttachment optional (#1865)Eugen
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true Clean up old media files when creating a new domain block with reject_media set to true Return remote_url in media attachments API if local file is not present Undo domain block action in admin UI Ability to enable reject_media from admin UI
2017-04-15Give SINGLE_USER a chance to register (#1820)Marcin Cieślak
An attempt to open a brand new Mastodon instance configured as SINGLE_USER_MODE=true will cause an exception. Enable temporary registration if we have no users in the database Fixes #1817
2017-04-08Fix #1165 - before_action was called before protect_from_forgeryEugen Rochko
2017-04-07Allow setting of default language through configEugen Rochko
Setting of locale in controller extracted to Localized concern, the doorkeeper authorized applications controller moved under custom namespace with inclusion of Localized, which resolves the "it sometimes appears in a different random language" bug
2017-04-04Only call regeneration worker after first login after a 14 day breakEugen Rochko
2017-04-02Catching rack timeout from rails doesn't workEugen Rochko
2017-04-02Add proper error page for request timeoutsEugen Rochko
2017-03-19Fix wrong HTTP status codes on error pagesEugen Rochko
2017-01-21Improve error page layouting. 500 page has to stay static because it'sEugen Rochko
used from nginx when Rails fails.
2017-01-15Add nice error page for CSRF errors/cookie issue, and fix error page ↵Effy Elden
handling altogether
2016-12-26Fix #86 - resolve layout breaking on zoom-out on accounts gridEugen Rochko
2016-12-06Add filters for suspended accountsEugen Rochko
2016-12-03Fix #248 - Reload all accounts when fetching from cacheEugen Rochko
2016-12-01Fix pt translations, improve pre-cache queries, removing will_paginateEugen Rochko
from accounts/tags because it's a terribly inefficient way to paginate large sets of data
2016-11-30Further abstract caching for includesEugen Rochko
2016-11-30Normalize localizations, add stub for admin/accountsEugen Rochko
2016-11-30Make User#current_sign_in_at actually track when user was last active,Eugen Rochko
by updating it at least every 24h if the user visits the site
2016-11-29Unify collection caching codeEugen Rochko
2016-11-28Add simple admin overview of PuSH subscriptionsEugen Rochko
2016-11-24Mini Profiler not working well, remove itEugen Rochko
2016-11-23Rename "publish" to "toot" in english locale, fix lightbox showing old imageEugen Rochko
before loading new one, cache notifications API, fix missing follow button on public profiles
2016-11-22More query optimizationsEugen Rochko
2016-11-22Moving some counter queries out of subqueries in the APIEugen Rochko
2016-11-21Desktop notificationsEugen Rochko