Comments (6)
It seems like the framework is still doing something after throw403, then it went wrong.
from modules.
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.
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.
I know role but i didn't find any document about it.
Can you to tell me how it works?
from modules.
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.
Role works great.
Thank you.
from modules.
Related Issues (20)
- modules HOT 5
- Basic Stylus CSS renderer module HOT 1
- Broken demo link HOT 1
- auth whether already logged HOT 1
- Social Login Oauth HOT 2
- mail using sendgrid HOT 2
- Controller or view for 404 error HOT 2
- angular header creation HOT 1
- flash is not defined in conditionals? HOT 4
- auth.js HOT 2
- Typo in auth.js? HOT 1
- Using `@` flag for roles... HOT 1
- Jade/PUG - Global variables HOT 2
- Stylus module "CONFIG(...).indexOf is not a function" HOT 3
- Stylus @require and @import dont work
- the twitter module does not work HOT 3
- nosqlexplorer does not work as expected ... maybe I am wrong :-) HOT 6
- cnd.totaljs.com cdn down - 502 error HOT 2
- the pug module does not work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modules.