HNHacker News
TopNewBestAskShowJobs

Narzerus

46 karma · joined September 16, 2012

Chilean aspiring entrepreneur, love to create things of value.
submissionscomments
Narzerus··on Slack is offline
O.o god help us
Narzerus··on Node.js: You are managing your environment variables wrong
Environment variables should STILL be used in a production environment. This article helps manage development environments.
Narzerus··on Show HN: Yakuza – Scraping framework for Node.js
Thanks, looking forward to your feedback, Yakuza is still a baby but I think it can grow into a very useful tool if the right people come and boost it up <3
Narzerus··on Merry Christmas to HN
Love this community, Merry Xmass <3
Narzerus··on Show HN: Angular-permission simple access control for your routes in AngularJS
Author here:

Basically in angular-permission you define different validations the current session can pass or not. We are for now calling these 'roles' but im sure that's not the correct word to describe them.

To give you a better example, let's say we have a Session service which handles wether we are logged in or not, also stores information about the user currently logged in. We can define the following 'roles':

'anonymous' -> Session.currentUser is undefined 'admin' -> Session.currentUser.isAdmin is true 'user' -> Session.currentUser is defined

A common use-case would be not allowing the user to enter the signup and login view if we are already logged in. So to do that we would add in the login state a data.permissions object something like this:

permissions: { except: ['anonymous'] redirectTo: 'home' }

This is a fairly common use case of to what a library like this can be useful. Keep in mind it's still in early stage but we're currently using it in a fairly big project and it's saved us tons of lines of code.

Narzerus··on Show HN: Angular-permission simple access control for your routes in AngularJS
Author here: Awesome, let me know how it works for you and what would you improve.
Narzerus··on Show HN: Extension to read messages without your friends knowing
I think a custom tailored extension should offer a more consistent experience
Narzerus··on Show HN: Extension to read messages without your friends knowing
Author here: I could make this open source if anyone wants to collaborate (would need to tidy up code first, I made this in my noob years and its messy as hell)