Skip to content
Snippets Groups Projects

Resolve #3506444 "Preprocess username caching"

1 unresolved thread

Closes #3506444

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
66 67 }
67 68 }
68 69
70 if ($operation === 'view linked label') {
  • Should not we just re-use "view label"? OR also add "view label" operation to this "exception list"? Because if I am not mistaken (and as far as I remember) the same issue exists on user lists that includes my username when I am viewing the list.

  • Viewing labels is not what's causing the problem here. It's that some labels can have a link to the entity they represent. That's where the access check comes in and where we really shouldn't be varying by user as the end result would be inconsistent anyway.

    The 'view label' operation always returns TRUE for users. But we can't use that because the 'username' theme hook tries to add in links in template_preprocess_username().

    If we could differentiate between where we want a linked username and where we simply want a username, we could switch between using 'view label' and 'view linked label' accordingly.

  • Please register or sign in to reply
  • godotislate added 312 commits

    added 312 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading