CF enablement

This commit is contained in:
pianocktail
2020-02-06 08:27:57 +00:00
parent 6d0194acc0
commit 9932d02d57
16 changed files with 3238 additions and 20 deletions

View File

@@ -0,0 +1,10 @@
/** Service implementation for AdminService */
module.exports = cds.service.impl(function() {
this.before ('CREATE', 'Orders', _checkOrderCreateAuth)
})
/** Check authorization */
function _checkOrderCreateAuth (req) {
req.user.currency[0] === req.data.currency_code || req.reject(403)
}