DEV: Add comment about `UserController#cards` route (#16882)

This is unusual because it is not used directly by any core UI. It was added for theme components.
This commit is contained in:
David Taylor 2022-05-20 13:03:00 +01:00 committed by GitHub
parent 578955dcc9
commit a8163a5c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class UsersController < ApplicationController
show(for_card: true)
end
# This route is not used in core, but is used by theme components (e.g. https://meta.discourse.org/t/144479)
def cards
return redirect_to path('/login') if SiteSetting.hide_user_profiles_from_public && !current_user