Beispiel #1
0
        protected override void BaseSecure(Security config)
        {
            var provisional        = new SalesOrderStates(this.Session).Provisional;
            var onHold             = new SalesOrderStates(this.Session).OnHold;
            var requestsApproval   = new SalesOrderStates(this.Session).RequestsApproval;
            var readyForPosting    = new SalesOrderStates(this.Session).ReadyForPosting;
            var awaitingAcceptance = new SalesOrderStates(this.Session).AwaitingAcceptance;
            var inProcess          = new SalesOrderStates(this.Session).InProcess;
            var cancelled          = new SalesOrderStates(this.Session).Cancelled;
            var rejected           = new SalesOrderStates(this.Session).Rejected;
            var completed          = new SalesOrderStates(this.Session).Completed;
            var finished           = new SalesOrderStates(this.Session).Finished;
            var tranferred         = new SalesOrderStates(this.Session).Transferred;

            var setReadyForPosting = this.Meta.SetReadyForPosting;
            var post      = this.Meta.Post;
            var reopen    = this.Meta.Reopen;
            var approve   = this.Meta.Approve;
            var hold      = this.Meta.Hold;
            var @continue = this.Meta.Continue;
            var accept    = this.Meta.Accept;
            var revise    = this.Meta.Revise;
            var complete  = this.Meta.Complete;
            var ship      = this.Meta.Ship;
            var invoice   = this.Meta.Invoice;
            var reject    = this.Meta.Reject;
            var cancel    = this.Meta.Cancel;
            var transfer  = this.Meta.DoTransfer;

            config.Deny(this.ObjectType, provisional, reject, approve, @continue, ship, invoice, post, accept, reopen, revise);
            config.Deny(this.ObjectType, requestsApproval, setReadyForPosting, hold, @continue, ship, invoice, post, accept, reopen, revise, transfer);
            config.Deny(this.ObjectType, readyForPosting, setReadyForPosting, approve, complete, @continue, ship, invoice, accept, reopen, transfer);
            config.Deny(this.ObjectType, awaitingAcceptance, setReadyForPosting, post, approve, hold, @continue, complete, ship, invoice, reopen, transfer);
            config.Deny(this.ObjectType, inProcess, setReadyForPosting, post, accept, reject, approve, @continue, reopen, transfer);
            config.Deny(this.ObjectType, onHold, setReadyForPosting, reject, approve, hold, ship, invoice, post, accept, revise, transfer);
            config.Deny(this.ObjectType, rejected, reject, ship, invoice, post, accept, hold, @continue, revise, approve, setReadyForPosting, cancel, transfer);
            config.Deny(this.ObjectType, cancelled, cancel, ship, invoice, post, accept, hold, @continue, revise, approve, setReadyForPosting, reject, transfer);
            //config.Deny(this.ObjectType, tranferred, cancel, ship, invoice, post, accept, hold, @continue, revise, approve, setReadyForPosting, reject, transfer);
            config.Deny(this.ObjectType, completed, complete, reject, cancel, approve, hold, @continue, setReadyForPosting, invoice, post, accept, reopen, revise, transfer);

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

            config.DenyExcept(this.ObjectType, awaitingAcceptance, except, Operations.Write);
            config.DenyExcept(this.ObjectType, inProcess, except, Operations.Write);
            config.DenyExcept(this.ObjectType, cancelled, except, Operations.Write);
            config.DenyExcept(this.ObjectType, rejected, except, Operations.Write);
            config.DenyExcept(this.ObjectType, completed, except, Operations.Write);
            config.DenyExcept(this.ObjectType, finished, except, Operations.Execute, Operations.Write);
        }
Beispiel #2
0
        protected override void BaseSecure(Security config)
        {
            var provisional        = new SalesOrderStates(this.Session).Provisional;
            var onHold             = new SalesOrderStates(this.Session).OnHold;
            var requestsApproval   = new SalesOrderStates(this.Session).RequestsApproval;
            var readyForPosting    = new SalesOrderStates(this.Session).ReadyForPosting;
            var awaitingAcceptance = new SalesOrderStates(this.Session).AwaitingAcceptance;
            var inProcess          = new SalesOrderStates(this.Session).InProcess;
            var cancelled          = new SalesOrderStates(this.Session).Cancelled;
            var rejected           = new SalesOrderStates(this.Session).Rejected;
            var completed          = new SalesOrderStates(this.Session).Completed;
            var finished           = new SalesOrderStates(this.Session).Finished;

            var setReadyForPosting = this.Meta.SetReadyForPosting;
            var post      = this.Meta.Post;
            var reopen    = this.Meta.Reopen;
            var approve   = this.Meta.Approve;
            var hold      = this.Meta.Hold;
            var @continue = this.Meta.Continue;
            var accept    = this.Meta.Accept;
            var revise    = this.Meta.Revise;
            var complete  = this.Meta.Complete;
            var ship      = this.Meta.Ship;
            var invoice   = this.Meta.Invoice;
            var reject    = this.Meta.Reject;
            var cancel    = this.Meta.Cancel;

            config.Deny(this.ObjectType, provisional, reject, approve, @continue, ship, invoice, post, accept, reopen, revise);
            config.Deny(this.ObjectType, requestsApproval, setReadyForPosting, hold, @continue, ship, invoice, post, accept, reopen, revise);
            config.Deny(this.ObjectType, readyForPosting, setReadyForPosting, approve, complete, @continue, ship, invoice, accept, reopen);
            config.Deny(this.ObjectType, awaitingAcceptance, setReadyForPosting, post, approve, hold, @continue, complete, ship, invoice, reopen);
            config.Deny(this.ObjectType, inProcess, setReadyForPosting, post, accept, reject, approve, @continue, reopen);
            config.Deny(this.ObjectType, onHold, setReadyForPosting, reject, approve, hold, ship, invoice, post, accept, revise);
            config.Deny(this.ObjectType, rejected, reject, ship, invoice, post, accept, hold, @continue, revise, approve, setReadyForPosting, cancel);
            config.Deny(this.ObjectType, cancelled, cancel, ship, invoice, post, accept, hold, @continue, revise, approve, setReadyForPosting, reject);
            config.Deny(this.ObjectType, completed, complete, reject, cancel, approve, hold, @continue, setReadyForPosting, invoice, post, accept, reopen, revise);

            config.Deny(this.ObjectType, awaitingAcceptance, Operations.Write);
            config.Deny(this.ObjectType, inProcess, Operations.Write);
            config.Deny(this.ObjectType, cancelled, Operations.Write);
            config.Deny(this.ObjectType, rejected, Operations.Write);
            config.Deny(this.ObjectType, completed, Operations.Write);
            config.Deny(this.ObjectType, finished, Operations.Execute, Operations.Write);
        }
Beispiel #3
0
        protected override void AppsSecure(Security config)
        {
            base.AppsSecure(config);

            var provisional      = new SalesOrderStates(this.Session).Provisional;
            var onHold           = new SalesOrderStates(this.Session).OnHold;
            var requestsApproval = new SalesOrderStates(this.Session).RequestsApproval;
            var inProcess        = new SalesOrderStates(this.Session).InProcess;
            var cancelled        = new SalesOrderStates(this.Session).Cancelled;
            var rejected         = new SalesOrderStates(this.Session).Rejected;
            var completed        = new SalesOrderStates(this.Session).Completed;
            var finished         = new SalesOrderStates(this.Session).Finished;

            var reject    = this.Meta.Reject;
            var complete  = this.Meta.Complete;
            var cancel    = this.Meta.Cancel;
            var approve   = this.Meta.Approve;
            var hold      = this.Meta.Hold;
            var @continue = this.Meta.Continue;
            var confirm   = this.Meta.Confirm;
            var ship      = this.Meta.Ship;
            var invoice   = this.Meta.Invoice;

            config.Deny(this.ObjectType, provisional, reject, approve, hold, @continue, ship, invoice);
            config.Deny(this.ObjectType, requestsApproval, confirm, hold, @continue, ship, invoice);
            config.Deny(this.ObjectType, inProcess, confirm, reject, approve, @continue);
            config.Deny(this.ObjectType, onHold, confirm, reject, approve, hold, ship, invoice);
            config.Deny(this.ObjectType, rejected, reject, ship, invoice);
            config.Deny(this.ObjectType, cancelled, cancel, ship, invoice);
            config.Deny(this.ObjectType, completed, complete, reject, cancel, approve, hold, @continue, confirm, invoice);

            config.Deny(this.ObjectType, cancelled, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, rejected, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, completed, Operations.Execute, Operations.Write);
            config.Deny(this.ObjectType, finished, Operations.Execute, Operations.Write);
        }