当前位置: 首页>>代码示例>>C#>>正文


C# ModelUser.Reload方法代码示例

本文整理汇总了C#中ModelUser.Reload方法的典型用法代码示例。如果您正苦于以下问题:C# ModelUser.Reload方法的具体用法?C# ModelUser.Reload怎么用?C# ModelUser.Reload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModelUser的用法示例。


在下文中一共展示了ModelUser.Reload方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetOwner

        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;
        }
开发者ID:phaetto,项目名称:services-update,代码行数:16,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例2: GetCustomerUserEntryOwning

        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;
        }
开发者ID:phaetto,项目名称:services-update,代码行数:16,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例3: GetModelUserACLs

        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;
        }
开发者ID:phaetto,项目名称:services-update,代码行数:16,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例4: CreateObjectFromOwner

        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();
        }
开发者ID:phaetto,项目名称:services-update,代码行数:18,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例5: GetApplicationExceptionOwning

        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;
        }
开发者ID:phaetto,项目名称:services-update,代码行数:16,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例6: SetACLs

            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();
            }
开发者ID:phaetto,项目名称:services-update,代码行数:20,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例7: SetRights

            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();
            }
开发者ID:phaetto,项目名称:services-update,代码行数:20,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例8: SetModelUserOwning

            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();
            }
开发者ID:phaetto,项目名称:services-update,代码行数:20,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例9: SetCustomerUserEntries

            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();
            }
开发者ID:phaetto,项目名称:services-update,代码行数:20,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs

示例10: Reload

            public ModelUser Reload(ModelUser _ModelUser, string SessionToken)
            {
                _ModelUser.Reload();

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

                return _ModelUser;
            }
开发者ID:phaetto,项目名称:services-update,代码行数:9,代码来源:Services.Packages.Security.Security.ModelUserSecureService.cs


注:本文中的ModelUser.Reload方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。