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


C# Domain.Deny方法代码示例

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


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

示例1: AppsSecure

        protected override void AppsSecure(Domain.Security config)
        {
            base.AppsSecure(config);

            var full = new[] { Operations.Read, Operations.Write, Operations.Execute };

            config.GrantAdministrator(this.ObjectType, full);

            var openedState = new WorkEffortObjectStates(Session).NeedsAction;
            var cancelledState = new WorkEffortObjectStates(Session).Cancelled;
            var finishedState = new WorkEffortObjectStates(Session).Completed;

            config.Deny(this.ObjectType, openedState, WorkEfforts.Meta.Reopen);

            config.Deny(this.ObjectType, cancelledState, Operation.Execute, Operations.Write);
            config.Deny(this.ObjectType, finishedState, Operation.Execute, Operations.Read);
        }
开发者ID:Allors,项目名称:apps,代码行数:17,代码来源:Requirements.cs

示例2: AppsSecure

        protected override void AppsSecure(Domain.Security config)
        {
            base.AppsSecure(config);

            var full = new[] { Operations.Read, Operations.Write, Operations.Execute };

            config.GrantAdministrator(this.ObjectType, full);

            config.GrantOperations(this.ObjectType, full);

            config.GrantCustomer(this.ObjectType, Meta.CurrentPickListStatus, Operations.Read);
            config.GrantCustomer(this.ObjectType, Meta.PickListStatuses, Operations.Read);

            var created = new PickListObjectStates(Session).Created;
            var onHold = new PickListObjectStates(Session).OnHold;
            var picked = new PickListObjectStates(Session).Picked;
            var cancelled = new PickListObjectStates(Session).Cancelled;

            config.Deny(this.ObjectType, created, Meta.Continue);
            config.Deny(this.ObjectType, onHold, Meta.Hold);

            config.Deny(this.ObjectType, picked, Operation.Execute, Operations.Write);
            config.Deny(this.ObjectType, cancelled, Operation.Execute, Operations.Write);
        }
开发者ID:Allors,项目名称:apps,代码行数:24,代码来源:PickLists.cs

示例3: AppsSecure

        protected override void AppsSecure(Domain.Security config)
        {
            base.AppsSecure(config);

            var full = new[] { Operations.Read, Operations.Write, Operations.Execute };

            config.GrantAdministrator(this.ObjectType, full);

            config.GrantOperations(this.ObjectType, full);

            config.GrantCustomer(this.ObjectType, Meta.CurrentShipmentStatus, Operations.Read);
            config.GrantCustomer(this.ObjectType, Meta.ShipToParty, Operations.Read);
            config.GrantCustomer(this.ObjectType, Meta.ShipmentStatuses, Operations.Read);
            config.GrantCustomer(this.ObjectType, Meta.ShipmentPackages, Operations.Read);

            config.GrantSales(this.ObjectType, Meta.CurrentShipmentStatus, Operations.Read);
            config.GrantSales(this.ObjectType, Meta.ShipToParty, Operations.Read);
            config.GrantSales(this.ObjectType, Meta.ShipmentStatuses, Operations.Read);
            config.GrantSales(this.ObjectType, Meta.ShipmentPackages, Operations.Read);

            var created = new CustomerShipmentObjectStates(Session).Created;
            var picked = new CustomerShipmentObjectStates(Session).Picked;
            var packed = new CustomerShipmentObjectStates(Session).Packed;
            var shipped = new CustomerShipmentObjectStates(Session).Shipped;
            var delivered = new CustomerShipmentObjectStates(Session).Delivered;
            var cancelled = new CustomerShipmentObjectStates(Session).Cancelled;
            var onHold = new CustomerShipmentObjectStates(Session).OnHold;

            var hold = Meta.Hold;
            var @continue = Meta.Continue;
            var ship = Meta.Ship;

            config.Deny(this.ObjectType, shipped, hold, @continue);
            config.Deny(this.ObjectType, onHold, ship, hold, @continue);
            config.Deny(this.ObjectType, created, hold, @continue);
            config.Deny(this.ObjectType, picked, @continue);
            config.Deny(this.ObjectType, packed, @continue);

            config.Deny(this.ObjectType, cancelled, Operation.Execute, Operations.Write);
            config.Deny(this.ObjectType, shipped, Operation.Execute, Operations.Write);
            config.Deny(this.ObjectType, delivered, Operation.Execute, Operations.Write);
        }
开发者ID:Allors,项目名称:apps,代码行数:42,代码来源:CustomerShipments.cs


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