public Services.Packages.Security.ModelUser GetOwner(ModelUser _ModelUser, string SessionToken)
        {
            _ModelUser.Reload();

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser.Owner, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ModelUser.Owner;
        }
        public Services.Packages.CustomerUserEntryCollection GetCustomerUserEntryOwning(ModelUser _ModelUser, string SessionToken)
        {
            _ModelUser.Reload();

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            /*
            if (!Services.Packages.Security.CustomerUserEntrySecureService.CheckAccessImp(_ModelUser.CustomerUserEntryOwning, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ModelUser.CustomerUserEntryOwning;
        }
        public Services.Packages.Security.Security.ModelUserAccessControlListCollection GetModelUserACLs(ModelUser _ModelUser, string SessionToken)
        {
            _ModelUser.Reload();

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            /*
            if (!Services.Packages.Security.Security.Security.ModelUserAccessControlListSecureService.CheckAccessImp(_ModelUser.ModelUserACLs, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ModelUser.ModelUserACLs;
        }
        public void CreateObjectFromOwner(ModelUser _ModelUser, Services.Packages.Security.ModelUser _Owner, string SessionToken)
        {
            ModelSession session = ModelUserSecureService.CheckSessionImp(SessionToken);

            //if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ModelUserOwning"))
            //	throw new UnauthorizedAccessException("Access Denied");

            _ModelUser.Reload();

            if (!_ModelUser.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ModelUserOwning"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (_ModelUser.Exists && !ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");

            _ModelUser.Owner = session.User;
            _ModelUser.Owner = _Owner;
            _ModelUser.Create();
        }
        public Services.Packages.Log.ApplicationExceptionCollection GetApplicationExceptionOwning(ModelUser _ModelUser, string SessionToken)
        {
            _ModelUser.Reload();

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            /*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ModelUser.ApplicationExceptionOwning, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ModelUser.ApplicationExceptionOwning;
        }
            public void SetACLs(ModelUser _ModelUser, Services.Packages.Security.Security.ModelUserAccessControlListCollection _ACLs, string SessionToken)
            {
                _ModelUser.Reload();

                //*
                if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                /*
                _ACLs.Reload();
                if (_ACLs.Exists && !Services.Packages.Security.Security.Security.ModelUserAccessControlListSecureService.CheckAccessImp(_ACLs, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
                else if (!_ACLs.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Create ACLs"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                _ModelUser.ACLs = _ACLs;
                _ModelUser.Update();
            }
            public void SetRights(ModelUser _ModelUser, Services.Packages.Security.ModelUserRightsCollection _Rights, string SessionToken)
            {
                _ModelUser.Reload();

                //*
                if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                /*
                _Rights.Reload();
                if (_Rights.Exists && !Services.Packages.Security.Security.ModelUserRightsSecureService.CheckAccessImp(_Rights, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
                else if (!_Rights.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Create Rights"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                _ModelUser.Rights = _Rights;
                _ModelUser.Update();
            }
            public void SetModelUserOwning(ModelUser _ModelUser, Services.Packages.Security.ModelUserCollection _ModelUserOwning, string SessionToken)
            {
                _ModelUser.Reload();

                //*
                if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                /*
                _ModelUserOwning.Reload();
                if (_ModelUserOwning.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUserOwning, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
                else if (!_ModelUserOwning.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Create ModelUserOwning"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                _ModelUser.ModelUserOwning = _ModelUserOwning;
                _ModelUser.Update();
            }
            public void SetCustomerUserEntries(ModelUser _ModelUser, Services.Packages.CustomerUserEntryCollection _CustomerUserEntries, string SessionToken)
            {
                _ModelUser.Reload();

                //*
                if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                /*
                _CustomerUserEntries.Reload();
                if (_CustomerUserEntries.Exists && !Services.Packages.Security.CustomerUserEntrySecureService.CheckAccessImp(_CustomerUserEntries, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
                else if (!_CustomerUserEntries.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Create CustomerUserEntries"))
                throw new UnauthorizedAccessException("Access Denied");
                //*/

                _ModelUser.CustomerUserEntries = _CustomerUserEntries;
                _ModelUser.Update();
            }
            public ModelUser Reload(ModelUser _ModelUser, string SessionToken)
            {
                _ModelUser.Reload();

                if (!ModelUserSecureService.CheckAccessImp(_ModelUser, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");

                return _ModelUser;
            }