本文整理汇总了C#中Security.Deny方法的典型用法代码示例。如果您正苦于以下问题:C# Security.Deny方法的具体用法?C# Security.Deny怎么用?C# Security.Deny使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security.Deny方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppsSecure
protected override void AppsSecure(Security config)
{
base.AppsSecure(config);
var full = new[] { Operations.Read, Operations.Write, Operations.Execute };
config.GrantAdministrator(this.ObjectType, full);
var paid = new PurchaseInvoiceItemObjectStates(Session).Paid;
var cancelled = new PurchaseInvoiceItemObjectStates(Session).Cancelled;
config.Deny(this.ObjectType, paid, Operations.Write, Operation.Execute);
config.Deny(this.ObjectType, cancelled, Operations.Write, Operation.Execute);
}
示例2: AppsSecure
protected override void AppsSecure(Security config)
{
base.AppsSecure(config);
var full = new[] { Operations.Read, Operations.Write, Operations.Execute };
config.GrantAdministrator(this.ObjectType, full);
config.GrantOwner(this.ObjectType, full);
ObjectState scheduled = new CommunicationEventObjectStates(this.Session).Scheduled;
ObjectState cancelled = new CommunicationEventObjectStates(this.Session).Cancelled;
ObjectState closed = new CommunicationEventObjectStates(this.Session).Completed;
config.Deny(this.ObjectType, scheduled, CommunicationEvents.Meta.Reopen);
config.Deny(this.ObjectType, closed, CommunicationEvents.Meta.Close, CommunicationEvents.Meta.Cancel);
config.Deny(this.ObjectType, closed, Operations.Write);
config.Deny(this.ObjectType, cancelled, Operation.Execute, Operations.Write);
}
示例3: AppsSecure
protected override void AppsSecure(Security config)
{
base.AppsSecure(config);
var write = Operations.Write;
var full = new[] { Operations.Read, Operations.Write, Operations.Execute };
config.GrantAdministrator(this.ObjectType, full);
var closed = new BudgetObjectStates(this.Session).Closed;
var opened = new BudgetObjectStates(this.Session).Opened;
config.Deny(this.ObjectType, closed, write);
}
示例4: AppsSecure
protected override void AppsSecure(Security config)
{
base.AppsSecure(config);
var full = new[] { Operations.Read, Operations.Write, Operations.Execute };
config.GrantAdministrator(this.ObjectType, full);
var created = new PurchaseOrderItemObjectStates(Session).Created;
var inProcess = new PurchaseOrderItemObjectStates(Session).InProcess;
var partiallyReceived = new PurchaseOrderItemObjectStates(Session).PartiallyReceived;
var received = new PurchaseOrderItemObjectStates(Session).Received;
var cancelled = new PurchaseOrderItemObjectStates(Session).Cancelled;
var rejected = new PurchaseOrderItemObjectStates(Session).Rejected;
var completed = new PurchaseOrderItemObjectStates(Session).Completed;
var finished = new PurchaseOrderItemObjectStates(Session).Finished;
var product = Meta.Product;
var part = Meta.Part;
config.Deny(this.ObjectType, partiallyReceived, product, part);
config.Deny(this.ObjectType, received, product, part);
var cancel = Meta.Cancel;
var reject = Meta.Reject;
// TODO: Delete
var delete = Meta.Delete;
config.Deny(this.ObjectType, created, cancel, reject);
config.Deny(this.ObjectType, completed, delete);
config.Deny(this.ObjectType, inProcess, delete);
config.Deny(this.ObjectType, partiallyReceived, delete, cancel, reject);
config.Deny(this.ObjectType, received, delete, cancel, reject);
config.Deny(this.ObjectType, inProcess, Operations.Write);
config.Deny(this.ObjectType, cancelled, Operation.Execute, Operations.Write);
config.Deny(this.ObjectType, rejected, Operation.Execute, Operations.Write);
config.Deny(this.ObjectType, completed, Operation.Execute, Operations.Write);
config.Deny(this.ObjectType, finished, Operation.Execute);
}