public void ReloadRestrictions()
 {
     ClearRestrictions();
     if (BusinessDomain.DataAccessProvider != null)
     {
         SetRestrictions(UserRestriction.GetAll());
     }
 }
        public override object Clone()
        {
            RestrictionNode clone = (RestrictionNode)base.Clone();

            clone.restrictions = new Dictionary <long, UserRestriction> ();
            foreach (KeyValuePair <long, UserRestriction> restriction in restrictions)
            {
                UserRestriction userRestriction = new UserRestriction(restriction.Value.UserId, restriction.Value.Name, restriction.Value.State);
                clone.restrictions.Add(restriction.Key, userRestriction);
            }
            return(clone);
        }
 public void SaveRestrictions()
 {
     UserRestriction.CommitChanges(GetAllRestrictions(this));
 }