- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 04:11 AM
The 'Edit' button on the top right of a Knowledge Article is causing confusion. It seems enabled for ALL users if they have the ability to edit articles in that KB.
Why would a user who is not the author or KB owner be able to edit an article (they already can comment/flag)??
Does anyone know how to only enable this button for the author and KB owner?
Solved! Go to Solution.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 04:53 AM
You nailed it Craig. If you have access to edit articles in that KB, then you have access to that button. By default, it does not restrict people to their own articles.
If you choose to modify the UI macro as Deepa suggests, keep in mind that you are modifying an OOB UI macro and it will not be updated in future upgrades. Once you modify it, you own it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 04:19 AM
Hi Craig,
It's rendered in the ui macro kb_view_common_header_toolbar which is called by the ui macro kb_view_common which is called by the ui page kb_view.
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 08:14 AM
Hi Deepa,
My requirement is like i should limit the Edit button only for Admins. In my case it is hiding Flag Article button also.
In this UI Macro - kb_view_common_header_toolbar
I just added the below condition check
<j:if test="${gs.hasRole('admin')}"> //After adding this line it is hiding both Edit and Flag Article
<j:if test="${showUpdateAction}">
<button id="editArticle" style="margin-left:0.4em;" title="${gs.getMessage('Edit content')}" aria-label="${gs.getMessage('Edit content')}" class="btn btn-default navbar-btn snc-article-header-toolbar-button pull-right">${gs.getMessage("Edit")}</button>
</j:if>
</j:if>
After adding the above piece of code it is hiding both Edit and Flag Article. But i dont want to hide the Flag Article only Edit button should be hided.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 04:53 AM
You nailed it Craig. If you have access to edit articles in that KB, then you have access to that button. By default, it does not restrict people to their own articles.
If you choose to modify the UI macro as Deepa suggests, keep in mind that you are modifying an OOB UI macro and it will not be updated in future upgrades. Once you modify it, you own it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 06:27 AM
Thanks Chuck
If I de-activate the current macro and make a copy (new name) with restrictions on the button does the de-activated one get upgraded in future updates?