YiAi/YiAiQuickDeploy/dist/common/auth/superAuth.guard.js
2024-02-06 13:43:30 +08:00

1 line
2.7 KiB
JavaScript

'use strict';const _0x316cc9=_0xc2ca;(function(_0x472e7c,_0xc70de4){const _0x56cff2=_0xc2ca,_0x2dc0e8=_0x472e7c();while(!![]){try{const _0x1476bb=parseInt(_0x56cff2(0xf2))/0x1+parseInt(_0x56cff2(0x102))/0x2+parseInt(_0x56cff2(0xf6))/0x3+parseInt(_0x56cff2(0xfc))/0x4*(-parseInt(_0x56cff2(0xf3))/0x5)+parseInt(_0x56cff2(0xfa))/0x6+-parseInt(_0x56cff2(0x104))/0x7+parseInt(_0x56cff2(0xfe))/0x8;if(_0x1476bb===_0xc70de4)break;else _0x2dc0e8['push'](_0x2dc0e8['shift']());}catch(_0x4ca48d){_0x2dc0e8['push'](_0x2dc0e8['shift']());}}}(_0x556c,0x997ba));var __decorate=this&&this['__decorate']||function(_0x5bc7f9,_0x5b67b3,_0x36a6f1,_0x5174b6){const _0x322f0a=_0xc2ca;var _0x35b512=arguments[_0x322f0a(0x100)],_0x21206c=_0x35b512<0x3?_0x5b67b3:_0x5174b6===null?_0x5174b6=Object['getOwnPropertyDescriptor'](_0x5b67b3,_0x36a6f1):_0x5174b6,_0x4672c1;if(typeof Reflect===_0x322f0a(0xfd)&&typeof Reflect[_0x322f0a(0xf8)]==='function')_0x21206c=Reflect[_0x322f0a(0xf8)](_0x5bc7f9,_0x5b67b3,_0x36a6f1,_0x5174b6);else{for(var _0x185750=_0x5bc7f9['length']-0x1;_0x185750>=0x0;_0x185750--)if(_0x4672c1=_0x5bc7f9[_0x185750])_0x21206c=(_0x35b512<0x3?_0x4672c1(_0x21206c):_0x35b512>0x3?_0x4672c1(_0x5b67b3,_0x36a6f1,_0x21206c):_0x4672c1(_0x5b67b3,_0x36a6f1))||_0x21206c;}return _0x35b512>0x3&&_0x21206c&&Object[_0x322f0a(0xef)](_0x5b67b3,_0x36a6f1,_0x21206c),_0x21206c;};Object[_0x316cc9(0xef)](exports,'__esModule',{'value':!![]}),exports[_0x316cc9(0xf7)]=void 0x0;function _0x556c(){const _0x12ab61=['976946tBhTYA','303865HtpokC','Injectable','JwtAuthGuard','404352VZTCQO','SuperAuthGuard','decorate','switchToHttp','2075142dacrVi','canActivate','4ntcAcF','object','203424SGzPVg','getRequest','length','非法操作、非超级管理员无权操作!','493598VGEucL','super','7282625DHESeZ','UnauthorizedException','defineProperty','role','@nestjs/common'];_0x556c=function(){return _0x12ab61;};return _0x556c();}function _0xc2ca(_0x88514d,_0x3c32e9){const _0x556c5b=_0x556c();return _0xc2ca=function(_0xc2ca63,_0x4c3899){_0xc2ca63=_0xc2ca63-0xef;let _0x2b1913=_0x556c5b[_0xc2ca63];return _0x2b1913;},_0xc2ca(_0x88514d,_0x3c32e9);}const common_1=require(_0x316cc9(0xf1)),jwtAuth_guard_1=require('./jwtAuth.guard');let SuperAuthGuard=class SuperAuthGuard extends jwtAuth_guard_1[_0x316cc9(0xf5)]{async['canActivate'](_0x49da8b){const _0x19f235=_0x316cc9,_0xdaf896=await super[_0x19f235(0xfb)](_0x49da8b);if(!_0xdaf896)return![];const _0x4a1dfb=_0x49da8b[_0x19f235(0xf9)]()[_0x19f235(0xff)](),_0x756970=_0x4a1dfb['user'];if(_0x756970&&_0x756970[_0x19f235(0xf0)]===_0x19f235(0x103))return!![];else throw new common_1[(_0x19f235(0x105))](_0x19f235(0x101));}};SuperAuthGuard=__decorate([(0x0,common_1[_0x316cc9(0xf4)])()],SuperAuthGuard),exports[_0x316cc9(0xf7)]=SuperAuthGuard;