In a scenario where the entire catalog is owned by a third-party system, e.g. a PIM, it would be nice if we could make the catalog read-only. Would it be possible to disable catalog editing alltogether or restrict it to certain fields?
I don't think it's possible in CM, but for Catalog UI you can create your own content provider, inherit from CatalogContentProvider and simply does nothing in Save().
To make it truely "Read-only" then you might want to override the LinksRepository as well.
Another approach is to create an implementaion of CatalogEventListenerBase and prevent any modification by throwing exceptions.
Would the following be possible:
I've put a POC together for this on content in the past and was wondering if this would work on Catalog entries too?
Unfortunately Commerce implemetation of ACL does not support that thing right now - so I don't think that'll be possible.
And to complete my question above, you can also override the ProviderCapabilities property to remove ContentProviderCapabilities.Create/Edit/Delete/Move/Copy enum, then in Catalog UI, options to edit content (move/copy/save...) will be disabled.
Just an idea :)
var contenEventHandler = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<EPiServer.Core.IContentEvents>();
void contenEventHandler_SavingContent(object sender, ContentEventArgs e)
//Is it Commerce?
e.RequiredAccess = AccessLevel.Administer;
e.CancelAction = true;
Is Episerver Commerce (Commerce UI, not Commerce Manager) going to have an implementation of ACL similar to the CMS one anytime soon? Meaning, an administrator would be able to set view/edit/create/updat/delete access rights on catalogs, nodes, products, etc?
It's in our backlog, but it would not happen anytime soon (I'm talking about 3-6 months period)
Thank you Quan for your quick response :)