March 2017
Intermediate to advanced
821 pages
18h 21m
English
Modularity of software is a great feature, the majority of this module has been about modularity and its advantages. However, there are some features of software that span the entire system. Security is a great example of this.
We would like to have similar security code in all the modules of the application to check that people are, in fact, authorized to perform some action. So if we have a function of the sort:
var GoldTransfer = (function () { function GoldTransfer() { } GoldTransfer.prototype.SendPaymentOfGold = function (amountOfGold, destination) { var user = Security.GetCurrentUser(); if (Security.IsAuthorized(user, "SendPaymentOfGold")) { //send actual payment } else { return { success: 0, message: "Unauthorized" ...Read now
Unlock full access