From 098865cbbfff74e492a469a28622552c6c5a3dbf Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Mon, 15 Jan 2018 17:13:35 -0500 Subject: [PATCH] Fix file permissions --- .gitignore | 0 README.md | 0 app/models/Invite.js | 0 app/models/Key.js | 0 app/models/Upload.js | 0 app/models/User.js | 0 app/public/css/form.css | 0 app/public/css/form.min.css | 0 app/public/css/home.css | 0 app/public/css/home.min.css | 0 app/public/css/index.css | 0 app/public/css/index.min.css | 0 app/public/css/panel.css | 0 app/public/css/panel.min.css | 0 app/public/index/typegraph.js | 0 app/public/panel/controllers/ApiCtrl.js | 0 app/public/panel/controllers/NavCtrl.js | 3 +-- app/public/panel/routes.js | 0 app/public/panel/shimapan-panel.js | 0 app/public/services/ApiSvc.js | 0 app/public/services/AuthSvc.js | 0 app/public/shimapan/components/LoginComp.js | 0 app/public/shimapan/components/RegisterComp.js | 0 app/public/shimapan/components/UploadComp.js | 0 app/public/shimapan/shimapan.js | 0 app/routes/auth.js | 9 +++++---- app/routes/home.js | 0 app/routes/index.js | 0 app/routes/keys.js | 0 app/routes/login.js | 0 app/routes/panel.js | 0 app/routes/register.js | 0 app/routes/routes.js | 0 app/routes/upload.js | 0 app/routes/view.js | 0 config/default.json | 0 config/dev.json | 0 config/passport.js | 0 config/test.json | 0 gulpfile.js | 0 package-lock.json | 0 package.json | 0 public/img/edge.mp4 | Bin public/img/flower.png | Bin public/img/glyphicons-512-copy.png | Bin public/views/home.html | 0 public/views/index.html | 0 public/views/login.html | 0 public/views/panel.html | 0 public/views/panel/api.html | 0 public/views/panel/dash.html | 0 public/views/panel/invites.html | 0 public/views/panel/search.html | 0 public/views/panel/stats.html | 0 public/views/panel/users.html | 0 public/views/register.html | 0 public/views/shimapan/login-form.html | 0 public/views/shimapan/register-form.html | 0 public/views/shimapan/upload-form.html | 0 test/api.js | 0 test/test.png | Bin test/testUtil.js | 0 62 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 .gitignore mode change 100755 => 100644 README.md mode change 100755 => 100644 app/models/Invite.js mode change 100755 => 100644 app/models/Key.js mode change 100755 => 100644 app/models/Upload.js mode change 100755 => 100644 app/models/User.js mode change 100755 => 100644 app/public/css/form.css mode change 100755 => 100644 app/public/css/form.min.css mode change 100755 => 100644 app/public/css/home.css mode change 100755 => 100644 app/public/css/home.min.css mode change 100755 => 100644 app/public/css/index.css mode change 100755 => 100644 app/public/css/index.min.css mode change 100755 => 100644 app/public/css/panel.css mode change 100755 => 100644 app/public/css/panel.min.css mode change 100755 => 100644 app/public/index/typegraph.js mode change 100755 => 100644 app/public/panel/controllers/ApiCtrl.js mode change 100755 => 100644 app/public/panel/controllers/NavCtrl.js mode change 100755 => 100644 app/public/panel/routes.js mode change 100755 => 100644 app/public/panel/shimapan-panel.js mode change 100755 => 100644 app/public/services/ApiSvc.js mode change 100755 => 100644 app/public/services/AuthSvc.js mode change 100755 => 100644 app/public/shimapan/components/LoginComp.js mode change 100755 => 100644 app/public/shimapan/components/RegisterComp.js mode change 100755 => 100644 app/public/shimapan/components/UploadComp.js mode change 100755 => 100644 app/public/shimapan/shimapan.js mode change 100755 => 100644 app/routes/auth.js mode change 100755 => 100644 app/routes/home.js mode change 100755 => 100644 app/routes/index.js mode change 100755 => 100644 app/routes/keys.js mode change 100755 => 100644 app/routes/login.js mode change 100755 => 100644 app/routes/panel.js mode change 100755 => 100644 app/routes/register.js mode change 100755 => 100644 app/routes/routes.js mode change 100755 => 100644 app/routes/upload.js mode change 100755 => 100644 app/routes/view.js mode change 100755 => 100644 config/default.json mode change 100755 => 100644 config/dev.json mode change 100755 => 100644 config/passport.js mode change 100755 => 100644 config/test.json mode change 100755 => 100644 gulpfile.js mode change 100755 => 100644 package-lock.json mode change 100755 => 100644 package.json mode change 100755 => 100644 public/img/edge.mp4 mode change 100755 => 100644 public/img/flower.png mode change 100755 => 100644 public/img/glyphicons-512-copy.png mode change 100755 => 100644 public/views/home.html mode change 100755 => 100644 public/views/index.html mode change 100755 => 100644 public/views/login.html mode change 100755 => 100644 public/views/panel.html mode change 100755 => 100644 public/views/panel/api.html mode change 100755 => 100644 public/views/panel/dash.html mode change 100755 => 100644 public/views/panel/invites.html mode change 100755 => 100644 public/views/panel/search.html mode change 100755 => 100644 public/views/panel/stats.html mode change 100755 => 100644 public/views/panel/users.html mode change 100755 => 100644 public/views/register.html mode change 100755 => 100644 public/views/shimapan/login-form.html mode change 100755 => 100644 public/views/shimapan/register-form.html mode change 100755 => 100644 public/views/shimapan/upload-form.html mode change 100755 => 100644 test/api.js mode change 100755 => 100644 test/test.png mode change 100755 => 100644 test/testUtil.js diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/app/models/Invite.js b/app/models/Invite.js old mode 100755 new mode 100644 diff --git a/app/models/Key.js b/app/models/Key.js old mode 100755 new mode 100644 diff --git a/app/models/Upload.js b/app/models/Upload.js old mode 100755 new mode 100644 diff --git a/app/models/User.js b/app/models/User.js old mode 100755 new mode 100644 diff --git a/app/public/css/form.css b/app/public/css/form.css old mode 100755 new mode 100644 diff --git a/app/public/css/form.min.css b/app/public/css/form.min.css old mode 100755 new mode 100644 diff --git a/app/public/css/home.css b/app/public/css/home.css old mode 100755 new mode 100644 diff --git a/app/public/css/home.min.css b/app/public/css/home.min.css old mode 100755 new mode 100644 diff --git a/app/public/css/index.css b/app/public/css/index.css old mode 100755 new mode 100644 diff --git a/app/public/css/index.min.css b/app/public/css/index.min.css old mode 100755 new mode 100644 diff --git a/app/public/css/panel.css b/app/public/css/panel.css old mode 100755 new mode 100644 diff --git a/app/public/css/panel.min.css b/app/public/css/panel.min.css old mode 100755 new mode 100644 diff --git a/app/public/index/typegraph.js b/app/public/index/typegraph.js old mode 100755 new mode 100644 diff --git a/app/public/panel/controllers/ApiCtrl.js b/app/public/panel/controllers/ApiCtrl.js old mode 100755 new mode 100644 diff --git a/app/public/panel/controllers/NavCtrl.js b/app/public/panel/controllers/NavCtrl.js old mode 100755 new mode 100644 index 20fb1d0..07891ea --- a/app/public/panel/controllers/NavCtrl.js +++ b/app/public/panel/controllers/NavCtrl.js @@ -3,7 +3,7 @@ var angular = require('angular'); angular.module('NavCtrl', ['AuthSvc']).controller('NavController', ['$scope', '$window', 'AuthService', function($scope, $window, AuthService) { $scope.user = {}; AuthService.currentUser(function(user) { - $scope.user = user; + $scope.user = username; }); $scope.logout = AuthService.logout; @@ -12,5 +12,4 @@ angular.module('NavCtrl', ['AuthSvc']).controller('NavController', ['$scope', '$ if (!$scope.user.scope) return false; return $scope.user.scope.indexOf(permission) !== -1; }; - }]); \ No newline at end of file diff --git a/app/public/panel/routes.js b/app/public/panel/routes.js old mode 100755 new mode 100644 diff --git a/app/public/panel/shimapan-panel.js b/app/public/panel/shimapan-panel.js old mode 100755 new mode 100644 diff --git a/app/public/services/ApiSvc.js b/app/public/services/ApiSvc.js old mode 100755 new mode 100644 diff --git a/app/public/services/AuthSvc.js b/app/public/services/AuthSvc.js old mode 100755 new mode 100644 diff --git a/app/public/shimapan/components/LoginComp.js b/app/public/shimapan/components/LoginComp.js old mode 100755 new mode 100644 diff --git a/app/public/shimapan/components/RegisterComp.js b/app/public/shimapan/components/RegisterComp.js old mode 100755 new mode 100644 diff --git a/app/public/shimapan/components/UploadComp.js b/app/public/shimapan/components/UploadComp.js old mode 100755 new mode 100644 diff --git a/app/public/shimapan/shimapan.js b/app/public/shimapan/shimapan.js old mode 100755 new mode 100644 diff --git a/app/routes/auth.js b/app/routes/auth.js old mode 100755 new mode 100644 index 3de29fa..f2d73da --- a/app/routes/auth.js +++ b/app/routes/auth.js @@ -69,8 +69,8 @@ function setupSession(username, req, res, cb) { passport.authenticate('local')(req, res, function () { req.session.save(function (err) { if (!err) { - req.session.username = username; - req.session.canonicalname = canonicalize(username); + req.session.passport.username = username; + req.session.passport.canonicalname = canonicalize(username); } cb(err); }); @@ -114,8 +114,8 @@ router.post('/login', function (req, res, next) { req.logIn(user, cb); }, function (cb) { - req.session.username = req.body.username; - req.session.canonicalname = canonicalize(req.body.username); + req.session.passport.username = req.body.username; + req.session.passport.canonicalname = canonicalize(req.body.username); cb(); } ], function (err) { @@ -132,6 +132,7 @@ router.get('/logout', function (req, res) { }); router.get('/session', function (req, res) { + console.log(req.session.passport); if (req.session.passport.canonicalname) { User.findOne({canonicalname: req.session.passport.canonicalname}, function (err, user) { res.status(200).json({ diff --git a/app/routes/home.js b/app/routes/home.js old mode 100755 new mode 100644 diff --git a/app/routes/index.js b/app/routes/index.js old mode 100755 new mode 100644 diff --git a/app/routes/keys.js b/app/routes/keys.js old mode 100755 new mode 100644 diff --git a/app/routes/login.js b/app/routes/login.js old mode 100755 new mode 100644 diff --git a/app/routes/panel.js b/app/routes/panel.js old mode 100755 new mode 100644 diff --git a/app/routes/register.js b/app/routes/register.js old mode 100755 new mode 100644 diff --git a/app/routes/routes.js b/app/routes/routes.js old mode 100755 new mode 100644 diff --git a/app/routes/upload.js b/app/routes/upload.js old mode 100755 new mode 100644 diff --git a/app/routes/view.js b/app/routes/view.js old mode 100755 new mode 100644 diff --git a/config/default.json b/config/default.json old mode 100755 new mode 100644 diff --git a/config/dev.json b/config/dev.json old mode 100755 new mode 100644 diff --git a/config/passport.js b/config/passport.js old mode 100755 new mode 100644 diff --git a/config/test.json b/config/test.json old mode 100755 new mode 100644 diff --git a/gulpfile.js b/gulpfile.js old mode 100755 new mode 100644 diff --git a/package-lock.json b/package-lock.json old mode 100755 new mode 100644 diff --git a/package.json b/package.json old mode 100755 new mode 100644 diff --git a/public/img/edge.mp4 b/public/img/edge.mp4 old mode 100755 new mode 100644 diff --git a/public/img/flower.png b/public/img/flower.png old mode 100755 new mode 100644 diff --git a/public/img/glyphicons-512-copy.png b/public/img/glyphicons-512-copy.png old mode 100755 new mode 100644 diff --git a/public/views/home.html b/public/views/home.html old mode 100755 new mode 100644 diff --git a/public/views/index.html b/public/views/index.html old mode 100755 new mode 100644 diff --git a/public/views/login.html b/public/views/login.html old mode 100755 new mode 100644 diff --git a/public/views/panel.html b/public/views/panel.html old mode 100755 new mode 100644 diff --git a/public/views/panel/api.html b/public/views/panel/api.html old mode 100755 new mode 100644 diff --git a/public/views/panel/dash.html b/public/views/panel/dash.html old mode 100755 new mode 100644 diff --git a/public/views/panel/invites.html b/public/views/panel/invites.html old mode 100755 new mode 100644 diff --git a/public/views/panel/search.html b/public/views/panel/search.html old mode 100755 new mode 100644 diff --git a/public/views/panel/stats.html b/public/views/panel/stats.html old mode 100755 new mode 100644 diff --git a/public/views/panel/users.html b/public/views/panel/users.html old mode 100755 new mode 100644 diff --git a/public/views/register.html b/public/views/register.html old mode 100755 new mode 100644 diff --git a/public/views/shimapan/login-form.html b/public/views/shimapan/login-form.html old mode 100755 new mode 100644 diff --git a/public/views/shimapan/register-form.html b/public/views/shimapan/register-form.html old mode 100755 new mode 100644 diff --git a/public/views/shimapan/upload-form.html b/public/views/shimapan/upload-form.html old mode 100755 new mode 100644 diff --git a/test/api.js b/test/api.js old mode 100755 new mode 100644 diff --git a/test/test.png b/test/test.png old mode 100755 new mode 100644 diff --git a/test/testUtil.js b/test/testUtil.js old mode 100755 new mode 100644