mirror of
https://github.com/Foltik/Shimapan
synced 2024-12-29 05:11:55 -05:00
Fix file permissions
This commit is contained in:
parent
26cc9bf6ef
commit
098865cbbf
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
app/models/Invite.js
Executable file → Normal file
0
app/models/Invite.js
Executable file → Normal file
0
app/models/Key.js
Executable file → Normal file
0
app/models/Key.js
Executable file → Normal file
0
app/models/Upload.js
Executable file → Normal file
0
app/models/Upload.js
Executable file → Normal file
0
app/models/User.js
Executable file → Normal file
0
app/models/User.js
Executable file → Normal file
0
app/public/css/form.css
Executable file → Normal file
0
app/public/css/form.css
Executable file → Normal file
0
app/public/css/form.min.css
vendored
Executable file → Normal file
0
app/public/css/form.min.css
vendored
Executable file → Normal file
0
app/public/css/home.css
Executable file → Normal file
0
app/public/css/home.css
Executable file → Normal file
0
app/public/css/home.min.css
vendored
Executable file → Normal file
0
app/public/css/home.min.css
vendored
Executable file → Normal file
0
app/public/css/index.css
Executable file → Normal file
0
app/public/css/index.css
Executable file → Normal file
0
app/public/css/index.min.css
vendored
Executable file → Normal file
0
app/public/css/index.min.css
vendored
Executable file → Normal file
0
app/public/css/panel.css
Executable file → Normal file
0
app/public/css/panel.css
Executable file → Normal file
0
app/public/css/panel.min.css
vendored
Executable file → Normal file
0
app/public/css/panel.min.css
vendored
Executable file → Normal file
0
app/public/index/typegraph.js
Executable file → Normal file
0
app/public/index/typegraph.js
Executable file → Normal file
0
app/public/panel/controllers/ApiCtrl.js
Executable file → Normal file
0
app/public/panel/controllers/ApiCtrl.js
Executable file → Normal file
3
app/public/panel/controllers/NavCtrl.js
Executable file → Normal file
3
app/public/panel/controllers/NavCtrl.js
Executable file → Normal file
@ -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;
|
||||
};
|
||||
|
||||
}]);
|
0
app/public/panel/routes.js
Executable file → Normal file
0
app/public/panel/routes.js
Executable file → Normal file
0
app/public/panel/shimapan-panel.js
Executable file → Normal file
0
app/public/panel/shimapan-panel.js
Executable file → Normal file
0
app/public/services/ApiSvc.js
Executable file → Normal file
0
app/public/services/ApiSvc.js
Executable file → Normal file
0
app/public/services/AuthSvc.js
Executable file → Normal file
0
app/public/services/AuthSvc.js
Executable file → Normal file
0
app/public/shimapan/components/LoginComp.js
Executable file → Normal file
0
app/public/shimapan/components/LoginComp.js
Executable file → Normal file
0
app/public/shimapan/components/RegisterComp.js
Executable file → Normal file
0
app/public/shimapan/components/RegisterComp.js
Executable file → Normal file
0
app/public/shimapan/components/UploadComp.js
Executable file → Normal file
0
app/public/shimapan/components/UploadComp.js
Executable file → Normal file
0
app/public/shimapan/shimapan.js
Executable file → Normal file
0
app/public/shimapan/shimapan.js
Executable file → Normal file
9
app/routes/auth.js
Executable file → Normal file
9
app/routes/auth.js
Executable file → Normal file
@ -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({
|
||||
|
0
app/routes/home.js
Executable file → Normal file
0
app/routes/home.js
Executable file → Normal file
0
app/routes/index.js
Executable file → Normal file
0
app/routes/index.js
Executable file → Normal file
0
app/routes/keys.js
Executable file → Normal file
0
app/routes/keys.js
Executable file → Normal file
0
app/routes/login.js
Executable file → Normal file
0
app/routes/login.js
Executable file → Normal file
0
app/routes/panel.js
Executable file → Normal file
0
app/routes/panel.js
Executable file → Normal file
0
app/routes/register.js
Executable file → Normal file
0
app/routes/register.js
Executable file → Normal file
0
app/routes/routes.js
Executable file → Normal file
0
app/routes/routes.js
Executable file → Normal file
0
app/routes/upload.js
Executable file → Normal file
0
app/routes/upload.js
Executable file → Normal file
0
app/routes/view.js
Executable file → Normal file
0
app/routes/view.js
Executable file → Normal file
0
config/default.json
Executable file → Normal file
0
config/default.json
Executable file → Normal file
0
config/dev.json
Executable file → Normal file
0
config/dev.json
Executable file → Normal file
0
config/passport.js
Executable file → Normal file
0
config/passport.js
Executable file → Normal file
0
config/test.json
Executable file → Normal file
0
config/test.json
Executable file → Normal file
0
gulpfile.js
Executable file → Normal file
0
gulpfile.js
Executable file → Normal file
0
package-lock.json
generated
Executable file → Normal file
0
package-lock.json
generated
Executable file → Normal file
0
package.json
Executable file → Normal file
0
package.json
Executable file → Normal file
0
public/img/edge.mp4
Executable file → Normal file
0
public/img/edge.mp4
Executable file → Normal file
0
public/img/flower.png
Executable file → Normal file
0
public/img/flower.png
Executable file → Normal file
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
0
public/img/glyphicons-512-copy.png
Executable file → Normal file
0
public/img/glyphicons-512-copy.png
Executable file → Normal file
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
0
public/views/home.html
Executable file → Normal file
0
public/views/home.html
Executable file → Normal file
0
public/views/index.html
Executable file → Normal file
0
public/views/index.html
Executable file → Normal file
0
public/views/login.html
Executable file → Normal file
0
public/views/login.html
Executable file → Normal file
0
public/views/panel.html
Executable file → Normal file
0
public/views/panel.html
Executable file → Normal file
0
public/views/panel/api.html
Executable file → Normal file
0
public/views/panel/api.html
Executable file → Normal file
0
public/views/panel/dash.html
Executable file → Normal file
0
public/views/panel/dash.html
Executable file → Normal file
0
public/views/panel/invites.html
Executable file → Normal file
0
public/views/panel/invites.html
Executable file → Normal file
0
public/views/panel/search.html
Executable file → Normal file
0
public/views/panel/search.html
Executable file → Normal file
0
public/views/panel/stats.html
Executable file → Normal file
0
public/views/panel/stats.html
Executable file → Normal file
0
public/views/panel/users.html
Executable file → Normal file
0
public/views/panel/users.html
Executable file → Normal file
0
public/views/register.html
Executable file → Normal file
0
public/views/register.html
Executable file → Normal file
0
public/views/shimapan/login-form.html
Executable file → Normal file
0
public/views/shimapan/login-form.html
Executable file → Normal file
0
public/views/shimapan/register-form.html
Executable file → Normal file
0
public/views/shimapan/register-form.html
Executable file → Normal file
0
public/views/shimapan/upload-form.html
Executable file → Normal file
0
public/views/shimapan/upload-form.html
Executable file → Normal file
0
test/api.js
Executable file → Normal file
0
test/api.js
Executable file → Normal file
0
test/test.png
Executable file → Normal file
0
test/test.png
Executable file → Normal file
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
0
test/testUtil.js
Executable file → Normal file
0
test/testUtil.js
Executable file → Normal file
Loading…
Reference in New Issue
Block a user