Giter Site home page Giter Site logo

Comments (6)

 avatar commented on July 29, 2024

It seems like the framework is still doing something after throw403, then it went wrong.

from modules.

petersirka avatar petersirka commented on July 29, 2024

Hi @andylokandy,

How can I prevent the common user from visiting some pages like admin panel?
You can use roles.

... throw a framework error to console ...
Can you describe me the error?

Thanks

from modules.

andylokandy avatar andylokandy commented on July 29, 2024

Here is the error:

[2015-01-18 09:09:55.747] [INFO] console - inputmark/exam ---> TypeError: Cannot read property 'onExecute' of null ([object Object]) TypeError: Cannot read property 'onExecute' of null
at Subscribe.doExecute (C:\temp\ATproject\node_modules\total.js\index.js:4:4210)
at Subscribe.execute (C:\temp\ATproject\node_modules\total.js\index.js:4:2949)
at Subscribe.doAuthorization (C:\temp\ATproject\node_modules\total.js\index.js:4:5048)
at C:\temp\ATproject\node_modules\total.js\index.js:4:3652
at Promise. (C:\temp\ATproject\definitions\authorization.js:13:10)
at Promise. (C:\temp\ATproject\node_modules\mongoose\node_modules\mpromise\lib\promise.js:177:8)
at Promise.emit (events.js:95:17)
at Promise.emit (C:\temp\ATproject\node_modules\mongoose\node_modules\mpromise\lib\promise.js:84:38)
at Promise.fulfill (C:\temp\ATproject\node_modules\mongoose\node_modules\mpromise\lib\promise.js:97:20)
at C:\temp\ATproject\node_modules\mongoose\lib\query.js:1394:13

It occurred in the protected controller when it have been canceled.

from modules.

andylokandy avatar andylokandy commented on July 29, 2024

I know role but i didn't find any document about it.
Can you to tell me how it works?

from modules.

KiPSOFT-zz avatar KiPSOFT-zz commented on July 29, 2024

I know, role is only http flag.
You can describe to role flag in authorization.

https://github.com/totaljs/examples/blob/master/routing-flags-roles/definitions/authorization.js

Documentation;
http://docs.totaljs.com/v1.7.x/en.html#api~HttpRouteOptionsFlags~%40role

from modules.

andylokandy avatar andylokandy commented on July 29, 2024

Role works great.
Thank you.

from modules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.