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


C# Security.GrantAdministrator方法代码示例

本文整理汇总了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);
        }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:Organisations.cs

示例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);
        }
开发者ID:Allors,项目名称:demo,代码行数:10,代码来源:Invoices.cs

示例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);
        }
开发者ID:Allors,项目名称:apps,代码行数:14,代码来源:OrganisationGlAccounts.cs

示例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);
        }
开发者ID:Allors,项目名称:apps,代码行数:14,代码来源:PurchaseInvoiceItems.cs

示例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);
        }
开发者ID:Allors,项目名称:apps,代码行数:19,代码来源:FaceToFaceCommunications.cs

示例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);
        }
开发者ID:Allors,项目名称:apps,代码行数:40,代码来源:PurchaseOrderItems.cs

示例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);
        }
开发者ID:Allors,项目名称:apps,代码行数:37,代码来源:Organisations.cs

示例8: AppsSecure

        protected override void AppsSecure(Security config)
        {
            var full = new[] { Operations.Read, Operations.Write, Operations.Execute };

            config.GrantAdministrator(this.ObjectType, full);
        }
开发者ID:Allors,项目名称:apps,代码行数:6,代码来源:InternalOrganisations.cs


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