/// <summary> /// Support function, checking if SE is enabled for the given item ID. /// </summary> /// <param name="item">the tridion item</param> /// <returns>true if the item belongs to a publication that has active SE in this web application, false otherwise</returns> public static bool IsSiteEditEnabled(IRepositoryLocal item) { string pubIdWithoutTcm = Convert.ToString(new TcmUri(item.Id).PublicationId); try { return(SiteEditSettings.ContainsKey(pubIdWithoutTcm)); } catch (Exception) { // todo: add logging (log.Error("Unable to get pubID from URI", ex)) return(false); } }
public ServiceLocal(IRepositoryLocal repository) { _repository = repository; }
/// <summary> /// Support function, checking if SE is enabled for the given item ID. /// </summary> /// <param name="item">the tridion item</param> /// <returns>true if the item belongs to a publication that has active SE in this web application, false otherwise</returns> public static bool IsSiteEditEnabled(IRepositoryLocal item) { string pubIdWithoutTcm = Convert.ToString(new TcmUri(item.Id).PublicationId); try { return SiteEditSettings.ContainsKey(pubIdWithoutTcm); } catch (Exception) { // todo: add logging (log.Error("Unable to get pubID from URI", ex)) return false; } }