Merge branch 'feature/mastodon_api' into live
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-18 14:38:00 +04:00
3 changed files with 15 additions and 3 deletions

View File

@@ -1,9 +1,10 @@
class WebKeyDirectoryController < WellKnownController
before_action :allow_cross_origin_requests
# /.well-known/openpgpkey/hu/:hashed_username(.txt)
# /.well-known/openpgpkey/hu/:hashed_username(.txt)?l=username
def show
@user = User.find_by(cn: params[:l].downcase)
username = params[:l] || ""
@user = User.find_by(cn: username.downcase)
if @user.nil? ||
@user.pgp_pubkey.blank? ||

View File

@@ -6,7 +6,11 @@ module LdapManager
end
def call
replace_attribute @dn, :displayName, @display_name
if @display_name.present?
replace_attribute @dn, :displayName, @display_name
else
delete_attribute @dn, :displayName
end
end
end
end