add back authorization to schools
authorSeth Woodworth <seth@sethish.com>
Mon, 30 Jan 2012 20:10:31 +0000 (15:10 -0500)
committerSeth Woodworth <seth@sethish.com>
Mon, 30 Jan 2012 20:10:31 +0000 (15:10 -0500)
app.js

diff --git a/app.js b/app.js
index b029025ff217578c35b18b0d6224725907612e94..6b372816851854a7bebbf9d90c42aeaf53805f48 100644 (file)
--- a/app.js
+++ b/app.js
@@ -370,13 +370,13 @@ function loadSchool( req, res, next ) {
     //sys.puts(school);
     if( school ) {
       req.school = school;
-      //req.school.authorized = authorized;
 
       // If a school is found, the user is checked to see if they are
       // authorized to see or interact with anything related to that
       // school.
-      //school.authorize( user, function( authorized ){
-      //});
+      school.authorize( user, function( authorized ){
+          req.school.authorized = authorized;
+      });
       next();
     } else {
       // If no school is found, display an appropriate error.