- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 09:46 AM
Hi all, we enabled the Knowledge Management "enable minor edits to published article without creating a new version" property. And added fields to the "List of fields (comma-separated) that can be edited on published articles without creating a new version." valid_to,short_description,text. In Product Documentation for Article versioning properties, there is a Note: This feature is available for the following users: the knowledge administrator, the knowledge base manager, and the knowledge base owner.
This works. However, we would like to allow the Author of the KB article to make the same minor edits.
Any ideas?
Thanks, Ken
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 10:07 AM
Hi, I did, but I dont remember who to give credit to. I think I searched the community for "glide.knowman.versioning.minor_edit_fields" and found something.
There is a script include KBVersioningSNC that checks the user roles (where the above sys property is used). It can be overrode with script include "KBVersioning" as below
Ken
var KBVersioning = Class.create();
....
hasAnyElevatedAccess: function(current){
var PATH_TO_AUTHOR = current.author; // is author mod
var PATH_TO_CURRENT_USER = gs.getUser().getID(); // is author mod
var PATH_TO_OWNER = "kb_knowledge_base.owner";
var PATH_TO_MANAGERS = "kb_knowledge_base.kb_managers";
if (gs.hasRole("knowledge_admin"))
return true;
if (this.isKnowledgeBaseOwner(current, PATH_TO_OWNER))
return true;
if (this.isKnowledgeBaseManager(current,PATH_TO_MANAGERS))
return true;
if (PATH_TO_AUTHOR == PATH_TO_CURRENT_USER) // is author mod
return true; // is author mod
return false;
},
type: 'KBVersioning'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 08:47 AM
Did you ever figure out a solution? I'm facing the same request right now.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 10:07 AM
Hi, I did, but I dont remember who to give credit to. I think I searched the community for "glide.knowman.versioning.minor_edit_fields" and found something.
There is a script include KBVersioningSNC that checks the user roles (where the above sys property is used). It can be overrode with script include "KBVersioning" as below
Ken
var KBVersioning = Class.create();
....
hasAnyElevatedAccess: function(current){
var PATH_TO_AUTHOR = current.author; // is author mod
var PATH_TO_CURRENT_USER = gs.getUser().getID(); // is author mod
var PATH_TO_OWNER = "kb_knowledge_base.owner";
var PATH_TO_MANAGERS = "kb_knowledge_base.kb_managers";
if (gs.hasRole("knowledge_admin"))
return true;
if (this.isKnowledgeBaseOwner(current, PATH_TO_OWNER))
return true;
if (this.isKnowledgeBaseManager(current,PATH_TO_MANAGERS))
return true;
if (PATH_TO_AUTHOR == PATH_TO_CURRENT_USER) // is author mod
return true; // is author mod
return false;
},
type: 'KBVersioning'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2023 01:54 PM
@Ken24 Would you know if this is possible by specifying a specific role? I'm assuming they can since knowledge_manager is a role. Would be nice to specify a different role like if(PATH_TO_KCS_ROLE == PATH_TO_CURRENT_USER) return true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 11:34 AM
I ended up needing similar requirements for this, but since hasAnyElevatedAccess touches on a bunch of stuff I don't necessarily want authors to have access to, I instead decided to adjust just the canWrite function utilizing the PATH_TO_AUTHOR and PATH_TO_CURRENT_USER variables.
Moving it from:
return ((this.hasAnyElevatedAccess(current) || this.isMemberOfValidGroup(current, this.OWNERSHIP_GROUP)) && this.getEditableFields() != ''))
To:
return ((this.hasAnyElevatedAccess(current) || this.isMemberOfValidGroup(current, this.OWNERSHIP_GROUP)) && this.getEditableFields() != '' || (PATH_TO_AUTHOR == PATH_TO_CURRENT_USER && this.getEditableFields() != ''));
Now authors have the ability to do minor edits without giving them unintended access elsewhere.