"Enable CF Merge branch 'OpenSAP-week3-unit5' of https://github.com/SAP-samples/cloud-cap-samples into OpenSAP-week3-unit5

This commit is contained in:
pianocktail
2020-02-06 08:33:34 +00:00
8 changed files with 215 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
/** Service implementation for AdminService */
module.exports = cds.service.impl(function() {
<<<<<<< HEAD
this.before ('CREATE', 'Orders', _checkOrderCreateAuth)
})
@@ -8,3 +9,13 @@ module.exports = cds.service.impl(function() {
function _checkOrderCreateAuth (req) {
req.user.currency[0] === req.data.currency_code || req.reject(403)
}
=======
this.before ('CREATE', 'Orders', _checkOrderCreateAuth)
})
/** Check authorization */
function _checkOrderCreateAuth (req) {
req.user.currency[0] === req.data.currency_code || req.reject(403)
}
>>>>>>> cad3a32c78620f4c4558fad34991dd48866af8d3