- Issue created by @ressa
- π©π°Denmark ressa Copenhagen
Updating Issue Summary after switching to a template preprocess variable and Twig-based solution.
- πΊπΈUnited States smustgrave
There any security concern with putting user information into the dom?
- πΊπΈUnited States TolstoyDotCom L.A.
As long as this is just for logged-in users, putting their roles in the DOM seems to be analogous to putting any other user-specific info in the DOM.
However, a site might have a 'shadowbanned' role, and admins might be too cowardly to reveal that to the user. On the justifiable front, a site might have security levels and wouldn't want to reveal to a user which level they're on.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I think this should be closed as won't fix for the following reasons
- It doesn't meet the needs of the 80% use case
- It can easily be achieved with existing APIs for sites or themes that need it
- It causes a lot of cache fragmentation because we're now varying the page cache in every site by each unique combination of roles the user can have. Making all sites pay this cost for the low fraction of sites that need it is the main reason to close this in my opinion (note th current patch doesn't add the user.roles context to the #cache array, but should)
Thank you for taking the time to open this issue, for sharing your solution and for creating an MR for consideration