Avatar image only visible for some roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 04:22 AM
Hello,
We have added pictures of our employees on their live feed profile (company pictures), so that these pictures appear on the small round avatar next to their names throughout the SNOW interface (e.g. all ticket forms in the activity log).
However we would like these avatars to be ONLY visible for internal employees (with a specific role) and not the customers (which connect to self-service portal)
I've tried to play around with the live_feed table and ACL's to restrict read but this is not doing the trick.
Can someone help me out and bring me to the right direction?
Many thanks!
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 07:17 AM
Hi Rob,
You may find below thread helpful.
Can the Live Feed photo upload be turned off?
Cheers,
- T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2018 05:13 AM
Dear T,
unfortunately I had followed that post, but in my case it does not help.
what I would like to achieve is to show these profile pictures only to some roles, and not to others.
Essentially I want to use them only for internal use for my teams, but I do not want the customers or external partners to see it on the self-servce portal.
I guess this must be an ACL of some kind, but I do not know which one.
I tried ACL on live_feed profile table, on user table, on attachment table, nothing...
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2018 09:02 AM
I guess this must be an ACL of some kind, but I do not know which one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2018 01:36 AM
response from SNOW support!
In order to hide the image badges that appear in the stream you would need to make the following modification to a clone of the widget:
a) modify the server code and add to the bottom of the script.
// only display avatars if the user has the custom role "display_avatars"
data.displayAvatars = gs.hasRole("display_avatars");
b) modify the HTML Template code to conditionally display the image badge if the variable is true.
in the following code section:
<div class="timeline-badge">
<sn-avatar-once
ng-if="hasLiveProfile(e.user_sys_id)"
primary="getLiveProfileByUserId(e.user_sys_id)"
class="avatar-large"
show-presence="false"
enable-context-menu="false">
</sn-avatar-once>
</div>
modify the first line to:
<div class="timeline-badge" ng-if="data.displayAvatars">
The above should mean that only users with the custom role "display_avatars" can see the image badges in the tickets page.
You would also have to consider making similar reconfiguration to other widgets that display image badges. The changes might vary depending on your requirement and the starting widget code.