Skip to content

Commit 05116ac

Browse files
author
Salah Eddine Lalami
committed
prevent usert from update profile
1 parent 2c3197d commit 05116ac

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Diff for: .vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"githubPullRequests.ignoredPullRequestBranches": ["master"]
3+
}

Diff for: backend/routes/coreRoutes/coreApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ router
6565
router
6666
.route('/profile/update/:id')
6767
.patch(
68-
hasPermission('read'),
68+
hasPermission(),
6969
adminPhotoUpload.single('file'),
7070
setFilePathToBody('photo'),
7171
catchErrors(adminController.updateProfile)

Diff for: backend/setup/reset.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ mongoose.Promise = global.Promise; // Tell Mongoose to use ES6 promises
77
async function deleteData() {
88
const Admin = require('../models/coreModels/Admin');
99
const Setting = require('../models/coreModels/Setting');
10+
const Email = require('../models/coreModels/Email');
1011
await Admin.remove();
1112
console.log('👍 admin Deleted. To setup demo admin data, run\n\n\t npm run setup\n\n');
1213
await Setting.remove();
1314
console.log('👍 Setting Deleted. To setup demo admin data, run\n\n\t npm run setup\n\n');
15+
await Email.remove();
16+
console.log('👍 Email Deleted. To setup demo admin data, run\n\n\t npm run setup\n\n');
1417
process.exit();
1518
}
1619

0 commit comments

Comments
 (0)