本文整理汇总了C#中Security.GrantAdministrator方法的典型用法代码示例。如果您正苦于以下问题:C# Security.GrantAdministrator方法的具体用法?C# Security.GrantAdministrator怎么用?C# Security.GrantAdministrator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security.GrantAdministrator方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSecure
protected override void TestSecure(Security config)
{
base.TestSecure(config);
var full = new[] { Operation.Read, Operation.Write, Operation.Execute };
config.GrantAdministrator(this.ObjectType, full);
}
示例2: CustomSecure
protected override void CustomSecure(Security config)
{
var full = new[] { Operation.Read, Operation.Write, Operation.Execute };
config.GrantAdministrator(this.ObjectType, full);
config.GrantEmployee(this.ObjectType, Operation.Read);
//config.GrantAccountant(this.ObjectType, Operation.Write);
config.Grant(Roles.AccountantId, this.ObjectType, Meta.Total, Operation.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 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);
}
示例5: 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);
}
示例6: 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);
}
示例7: 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.GrantCustomer(this.ObjectType, Meta.Name, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.LegalForm, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.LogoImage, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.TaxNumber, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.Locale, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.PartyContactMechanisms, Operations.Read, Operations.Write);
config.GrantCustomer(this.ObjectType, Meta.CurrentSalesReps, Operations.Read);
config.GrantCustomer(this.ObjectType, Meta.OpenOrderAmount, Operations.Read);
config.GrantCustomer(this.ObjectType, Meta.BankAccounts, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.Name, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.LegalForm, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.LogoImage, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.TaxNumber, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.Locale, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.PartyContactMechanisms, Operations.Read, Operations.Write);
config.GrantSupplier(this.ObjectType, Meta.CurrentSalesReps, Operations.Read);
config.GrantSupplier(this.ObjectType, Meta.OpenOrderAmount, Operations.Read);
config.GrantSupplier(this.ObjectType, Meta.BankAccounts, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.Name, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.LegalForm, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.LogoImage, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.TaxNumber, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.Locale, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.PartyContactMechanisms, Operations.Read, Operations.Write);
config.GrantPartner(this.ObjectType, Meta.CurrentSalesReps, Operations.Read);
config.GrantPartner(this.ObjectType, Meta.OpenOrderAmount, Operations.Read);
config.GrantPartner(this.ObjectType, Meta.BankAccounts, Operations.Read, Operations.Write);
}
示例8: AppsSecure
protected override void AppsSecure(Security config)
{
var full = new[] { Operations.Read, Operations.Write, Operations.Execute };
config.GrantAdministrator(this.ObjectType, full);
}