Hello,
Regrettably this kind of functionality is not implemented in Kentico CMS, so it would take a lot of customization from your side. I can offer you a compromise between a bit of customization and user's experience:
You can create a new web part category and place (or copy/clone) there web parts, which can be used only by your specific role, so only web parts from this category will be visible, when someone from that role will try to add a new one and you can specify it in following files (please edit them carefully and make a backup first):
\CMSModules\PortalEngine\Controls\WebParts\WebPartFlatSelector.ascx.cs, line 86:if (categoryId > 0)
{
if (CMSContext.CurrentUser.IsInRole("CMSEditor", "CorporateSite")) {
mSelectedCategory = WebPartCategoryInfoProvider.GetWebPartCategoryInfoById(399); // where 399 is CategoryID from CMS_WebPartCategory
}
else {
mSelectedCategory = WebPartCategoryInfoProvider.GetWebPartCategoryInfoById(categoryId);
}
}
\CMSModules\PortalEngine\Controls\WebParts\WebPartTree.ascx.cs, line 304:if (CMSContext.CurrentUser.IsInRole("CMSEditor", "CorporateSite"))
{
// Hide all web parts except one category
where = SqlHelperClass.AddWhereCondition(where, "ParentID = 399");
}
\CMSModules\PortalEngine\Controls\WebParts\WebPartTree.ascx.cs, line 345: // Add last recently used
if (ShowRecentlyUsed && !CMSContext.CurrentUser.IsInRole("CMSEditor", "CorporateSite"))
{
treeElem.AddDefaultItem(GetString("webparts.recentlyused"), "recentlyused", ResolveUrl(GetImageUrl("Objects/CMS_WebPartCategory/recentlyused.png")));
}
Where
CMSEditor is a role name of your specific role and
CorporateSite is a site name.
Best regards,
Jan Hermann