- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 12:57 PM
Hello Community,
This is a rather basic issue but i'm not convinced that i'm missing something here, so much as this being an issue with the content block itself. I read → Display content block (iFrame) only to users in specific group � that article but, it's still not working properly for me.
I have an iFrame content block that i would like to have shown based on the user having a certain role. In my test cases, i'm using the auditor role. Here is the code that i am using...
I am on the Helsinki version. The content block is still showing regardless if i have the role or not.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 01:47 PM
Ok, so it looks like I had to take a roundabout way of getting this to work as expected. Here is what i had to write into the condition field to properly evaluate the conditions i need.
The weird part is that even though i'm getting the proper answers now, the logs are still showing incorrect values for gs.getUser().hasRole('auditor').

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 01:04 PM
Hi Ken,
I would make sure you're not testing with the admin user, as hasRole() will always return true for an admin. You might also add some logging to see exactly what is happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 01:13 PM
That crossed my mind after several failed attempts but i'm logged in as a non-admin user and it's doing the same thing. I added logs and here is what i have...
Confirmed that the user does have the role...
Checked the logs and this is what i see...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 01:47 PM
Ok, so it looks like I had to take a roundabout way of getting this to work as expected. Here is what i had to write into the condition field to properly evaluate the conditions i need.
The weird part is that even though i'm getting the proper answers now, the logs are still showing incorrect values for gs.getUser().hasRole('auditor').

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2017 01:50 PM
Have you logged out and back in as that user? That's the only thing I can't think as you definitely shouldn't have to do a gliderecord query.