flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 620 B
JavaScript
'use strict';const model=global.getModel("right"),controller=require("../../controllers/controller");
module.exports=function($router$$){(new controller($router$$,model,"right",{require_id_app:!0,notNeedRight:!0,sort:{name:1},unique:["id_app","email","module"],onCreating:function($user$$,$obj$$,$next$$){if(!$user$$.appAdmin)return $next$$("B\u1ea1n kh\u00f4ng c\u00f3 quy\u1ec1n ph\u00e2n quy\u1ec1n");$next$$(null,$obj$$)},onUpdating:function($user$$,$data$$,$obj$$,$next$$){if(!$user$$.appAdmin)return $next$$("B\u1ea1n kh\u00f4ng c\u00f3 quy\u1ec1n ph\u00e2n quy\u1ec1n");$next$$(null,$data$$,$obj$$)}})).route()};