- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 04:33 AM
Here we have "Republish " button, it should be visible only ---who are having " kb_retire" role OR who are the author in KB article. My condition is not working.....
if you see below image i am not a Author of this article and i don't have kb_retire role, but it is visible me
it should be visible only=-------who are having " kb_retire" role OR who are the author in KB article.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 06:08 AM
can you try now
gs.getUser().getRoles().indexOf('kb_retire') >= 0 || current.author==gs.getUserID() || !(gs.getUser().getRoles().indexOf('admin') >= 0 )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 05:59 AM
HI,
((gs.hasRole('kb_retire') || current.author==gs.getUserID()) && !(gs.hasRole('admin'))
This will work.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 06:01 AM
it is working,
but when i am an Author of Article that time it is visible. but here it is not visible

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 06:06 AM
HI,
((gs.hasRole('kb_retire') || !(gs.hasRole('admin'))) || current.author==gs.getUserID())
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 06:25 AM
HI,
((gs.hasRole('kb_retire') && !(gs.hasRole('admin'))) || current.author==gs.getUserID())
No need to use index of.
Thanks,
Mark Helpful or correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 09:04 AM
Hi Ashutosh,
can you plesae help me in my PDI
Dev28601
raj/ 1234