ageg / webapp

ageg.ca dynamic website
0 stars 0 forks source link

Add basic auth #3

Closed carapas closed 9 years ago

carapas commented 9 years ago

Add basic user rights and by the same time add current user to layout.ejs

dozoisch commented 9 years ago

You might want to take a look at : https://github.com/dozoisch/pointsgenie/blob/master/lib/cas-strategy.js

I've did a passport strategy that is used in PointsGenie57 for users to be able to login with CAS directly.

carapas commented 9 years ago

It is already logging through CAS with the cas-authentication module, what I did was to add access rights to the users and create a middleware that restricts access to the desired routes.

carapas commented 9 years ago

See https://github.com/kylepixel/cas-authentication for the module!

gcourtemanche commented 9 years ago

Check your indentation (should be 2 spaces)

gcourtemanche commented 9 years ago

Make smaller commit, it will be easier to review and less things to change!

gcourtemanche commented 9 years ago

Code review done

carapas commented 9 years ago

Changes Dones

KertanLeGnome commented 9 years ago

All detected problem are corrected. You can merge.

carapas commented 9 years ago

Oops I forgot that :p

gcourtemanche commented 9 years ago

yes pi il a la variable toSend a changé de nom après tu vas pouvoir merger !

carapas commented 9 years ago

A propos de sa... quel case on utilise? Snake case ou camel case...

gcourtemanche commented 9 years ago

Je prefère snake mais le standard javascript est en camel. Le best serait camel case