UX: show complete URL path if website domain is same as instance domain#5
UX: show complete URL path if website domain is same as instance domain#5zaibkhan wants to merge 1 commit into
Conversation
Codoki PR ReviewSummary: Show full website path, fix privacy guard Issues (Critical & High only)
Showing top 1 issues. Critical: 0, High: 1. See inline suggestions for more. Key Feedback (click to expand)
Confidence: 3/5 — Needs work before merge (1 high · status: Requires changes) React with 👍 or 👎 if you found this review useful. |
| discourse_host.ends_with?("." << website_host) ? website_host + URI(website.to_s).path : website_host | ||
| end | ||
| end | ||
|
|
There was a problem hiding this comment.
?) so it won't be used by the serializer, and it doesn't incorporate the untrusted-field guard. As a result, website_name may be serialized when it should be hidden for TL0 users viewed anonymously. Either (a) define the proper include hook with the same guard logic as other untrusted attributes, or (b) better, add :website_name to untrusted_attributes and remove this method entirely to centralize behavior.
| def include_website_name? | |
| return false if scope.restrict_user_fields?(object) | |
| website.present? | |
| end |
No description provided.