Display Pattern: Show Permission Text on Thumbnail Overlay
Summary
I want to display the Permission applied to an image as a thumbnail overlay (thumbnail pattern on file type images).
{% if contentPermissionSetIds contains 'a16d98ceebe342c28fc5fc089a0f2ac4' %}
Archived
{% elsif contentPermissionSetIds contains 'c0b46e3b39154f12a1d1c9ab8fd365f0' %}
Public
{% elsif contentPermissionSetIds contains 'fb0fa99c03cc4a72b0b586cf3bed18cc' %}
Staff
{% elsif contentPermissionSetIds contains 'a628678f5e134f21a9f6b4e454113c23' %}
Admin
{% else %}
Private
{% endif %}
Permission Set Access
permissionSetIds
will access the Permission Sets, so I can check for individual Ids e.g. if permissionSetIds contains the Id I am looking for e.g. 123, then show "Archived" as a text on the thumbnail
is an array, so you must check for the position (permissionSetIds.[1]) or use contains.
Use Case
I want to display a text for the permission applied as a thumbnail overlay when a specific Permission Set is applied.
I have to change the thumbnail pattern for ImageMetadata (File Types/FileMetadata/ImageMetadata) and correspondingly all other File Types.
Thumbnail overlays are Display Pattern Thumbnails on File Types.
Steps
Open File Type > ImageMetadata (File Types/FileMetadata/ImageMetadata)
Update the Thumbnail Display Pattern
Check for Permission Sets using if/else
{% if contentPermissionSetIds contains 'a16d98ceebe342c28fc5fc089a0f2ac4' %}
Archived
{% elsif contentPermissionSetIds contains 'c0b46e3b39154f12a1d1c9ab8fd365f0' %}
Public
{% elsif contentPermissionSetIds contains 'fb0fa99c03cc4a72b0b586cf3bed18cc' %}
Staff
{% elsif contentPermissionSetIds contains 'a628678f5e134f21a9f6b4e454113c23' %}
Admin
{% else %}
Private
{% endif %}