Virgin-Acl nodejs

Asked

Viewed 51 times

1

I need to create access permissions on my page, but I have no idea where to start.
I installed the virgin-acl.

I have for example the page below and I want a user example just view:

app.get('/usuarios/novo', isLoggedIn, usuario.novo); 

I would like when accessing, was verified the user ID and if it is allowed to view this page.

The correct would be to use, as the following example:

acl.isAllowed('usuarioexemplo', 'usuarios', 'view', function(err, res){  
    if(res){  
        console.log("User joed is allowed to view blogs")  
    }  
}  

But where do I create these rules? No controller? No router? No app?

  • You can link to that virgin-acl?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.