示例#1
0
        protected override void BaseSecure(Security config)
        {
            var createdState   = new WorkEffortStates(this.Session).Created;
            var cancelledState = new WorkEffortStates(this.Session).Cancelled;
            var finishedState  = new WorkEffortStates(this.Session).Completed;

            config.Deny(this.ObjectType, createdState, M.WorkEffort.Reopen);

            config.Deny(this.ObjectType, cancelledState, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, finishedState, Operations.Execute, Operations.Read);
        }
示例#2
0
        protected override void BaseSecure(Security config)
        {
            var created    = new WorkEffortStates(this.Session).Created;
            var inProgress = new WorkEffortStates(this.Session).InProgress;
            var cancelled  = new WorkEffortStates(this.Session).Cancelled;
            var completed  = new WorkEffortStates(this.Session).Completed;
            var finished   = new WorkEffortStates(this.Session).Finished;

            var cancel   = this.Meta.Cancel;
            var reopen   = this.Meta.Reopen;
            var complete = this.Meta.Complete;
            var invoice  = this.Meta.Invoice;
            var revise   = this.Meta.Revise;

            config.Deny(this.ObjectType, created, reopen, complete, invoice, revise);
            config.Deny(this.ObjectType, inProgress, cancel, reopen, revise);
            config.Deny(this.ObjectType, cancelled, cancel, invoice, complete, revise);
            config.Deny(this.ObjectType, completed, cancel, reopen, complete);
            config.Deny(this.ObjectType, finished, cancel, reopen, complete, invoice, revise);

            var except = new HashSet <IOperandType>
            {
                this.Meta.ElectronicDocuments.RoleType,
                this.Meta.Print,
            };

            config.DenyExcept(this.ObjectType, cancelled, except, Operations.Write);
            config.DenyExcept(this.ObjectType, completed, except, Operations.Write);
            config.DenyExcept(this.ObjectType, finished, except, Operations.Write);

            config.Deny(M.TimeEntry, cancelled, Operations.Write);
            config.Deny(M.TimeEntry, finished, Operations.Write);
            config.Deny(M.TimeEntry, completed, Operations.Write);
            config.Deny(M.WorkEffortAssignmentRate, cancelled, Operations.Write);
            config.Deny(M.WorkEffortAssignmentRate, finished, Operations.Write);
            config.Deny(M.WorkEffortAssignmentRate, completed, Operations.Write);
            config.Deny(M.WorkEffortInventoryAssignment, cancelled, Operations.Write);
            config.Deny(M.WorkEffortInventoryAssignment, finished, Operations.Write);
            config.Deny(M.WorkEffortInventoryAssignment, completed, Operations.Write);
            config.Deny(M.WorkEffortPartyAssignment, cancelled, Operations.Write);
            config.Deny(M.WorkEffortPartyAssignment, finished, Operations.Write);
            config.Deny(M.WorkEffortPartyAssignment, completed, Operations.Write);
            config.Deny(M.WorkEffortPurchaseOrderItemAssignment, cancelled, Operations.Write);
            config.Deny(M.WorkEffortPurchaseOrderItemAssignment, finished, Operations.Write);
            config.Deny(M.WorkEffortPurchaseOrderItemAssignment, completed, Operations.Write);
            config.Deny(M.WorkEffortFixedAssetAssignment, cancelled, Operations.Write);
            config.Deny(M.WorkEffortFixedAssetAssignment, finished, Operations.Write);
            config.Deny(M.WorkEffortFixedAssetAssignment, completed, Operations.Write);
        }
示例#3
0
        protected override void AppsSecure(Security config)
        {
            base.AppsSecure(config);

            var created   = new WorkEffortStates(this.Session).Created;
            var cancelled = new WorkEffortStates(this.Session).Cancelled;
            var completed = new WorkEffortStates(this.Session).Completed;
            var finished  = new WorkEffortStates(this.Session).Finished;

            var cancel  = this.Meta.Cancel;
            var reopen  = this.Meta.Reopen;
            var invoice = this.Meta.Invoice;

            config.Deny(this.ObjectType, created, M.WorkEffort.Reopen);
            config.Deny(this.ObjectType, cancelled, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, finished, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, completed, Operations.Execute, Operations.Write);

            config.Deny(this.ObjectType, cancelled, cancel, invoice);
            config.Deny(this.ObjectType, completed, cancel);
            config.Deny(this.ObjectType, finished, cancel, invoice, reopen);
        }