Пример #1
0
 protected virtual void FireAfterRemoveProtection(Document doc, RemoveProtectionEventArgs e)
 {
     if (AfterRemoveProtection != null)
     {
         AfterRemoveProtection(doc, e);
     }
 }
Пример #2
0
 protected virtual void FireBeforeRemoveProtection(Document doc, RemoveProtectionEventArgs e)
 {
     if (BeforeRemoveProtection != null)
     {
         BeforeRemoveProtection(doc, e);
     }
 }
Пример #3
0
        public static void RemoveProtection(int DocumentId)
        {
            XmlElement x = (XmlElement)getPage(DocumentId);

            if (x != null)
            {
                //event
                RemoveProtectionEventArgs e = new RemoveProtectionEventArgs();
                new Access().FireBeforeRemoveProtection(new Document(DocumentId), e);

                if (!e.Cancel)
                {
                    x.ParentNode.RemoveChild(x);
                    save();
                    clearCheckPages();

                    new Access().FireAfterRemoveProtection(new Document(DocumentId), e);
                }
            }
        }
Пример #4
0
        public static void RemoveProtection(int DocumentId)
        {
            //event
            var doc = new Document(DocumentId);
            var e   = new RemoveProtectionEventArgs();

            new Access().FireBeforeRemoveProtection(doc, e);

            if (e.Cancel)
            {
                return;
            }

            var entry = ApplicationContext.Current.Services.PublicAccessService.GetEntryForContent(doc.ContentEntity);

            if (entry != null)
            {
                ApplicationContext.Current.Services.PublicAccessService.Delete(entry);
            }

            Save();

            new Access().FireAfterRemoveProtection(doc, e);
        }
		void Access_AfterRemoveProtection(global::umbraco.cms.businesslogic.web.Document sender, RemoveProtectionEventArgs e)
		{
			((UmbracoSiteMapProvider)System.Web.SiteMap.Provider).UpdateNode(new NodeFactory.Node(sender.Id));
		}
Пример #6
0
		protected virtual void FireAfterRemoveProtection(Document doc, RemoveProtectionEventArgs e) {
			if (AfterRemoveProtection != null)
				AfterRemoveProtection(doc, e);
		}
Пример #7
0
		protected virtual void FireBeforeRemoveProtection(Document doc, RemoveProtectionEventArgs e) {
			if (BeforeRemoveProtection != null)
				BeforeRemoveProtection(doc, e);
		}
Пример #8
0
		public static void RemoveProtection(int DocumentId) 
		{
			XmlElement x = (XmlElement) getPage(DocumentId);
			if (x != null) 
			{
				//event
				RemoveProtectionEventArgs e = new RemoveProtectionEventArgs();
				new Access().FireBeforeRemoveProtection(new Document(DocumentId), e);

				if (!e.Cancel) {

					x.ParentNode.RemoveChild(x);
					save();
					clearCheckPages();

					new Access().FireAfterRemoveProtection(new Document(DocumentId), e);
				}

			}
		}
Пример #9
0
 void Access_AfterRemoveProtection(global::umbraco.cms.businesslogic.web.Document sender, RemoveProtectionEventArgs e)
 {
     ((UmbracoSiteMapProvider)System.Web.SiteMap.Provider).UpdateNode(new NodeFactory.Node(sender.Id));
 }