Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Ensure emails have name, destination and subject
* Fix bug in TP account deletion
* Clarify permission checks in user routes
* Add project triggers

## 1.4.32 (2025-04-22)

Expand Down
7 changes: 3 additions & 4 deletions core/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports = {
return create_file('ssh_config', { user: user });
},

/* method for goldap.js */
/* methods for goldap.js */
ldap_reset_password: function (user, user_dn, fid) {
return create_file('ldap_reset_password', { user: user, user_dn: user_dn, fid: fid });
},
Expand Down Expand Up @@ -123,7 +123,7 @@ module.exports = {
});
},

/* method for users.js */
/* methods for users.js */
user_create_extra_user: function (user, fid) {
return create_file('user_create_extra_user', { user: user, fid: fid });
},
Expand Down Expand Up @@ -180,8 +180,7 @@ module.exports = {
return create_file('ssh_keygen', { user: user, fid: fid });
},

/* method for projects.js */

/* methods for projects.js */
project_add_project: function (project, fid) {
return create_file('project_add_project', { project: project, fid: fid });
},
Expand Down
8 changes: 8 additions & 0 deletions core/project.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ async function edit_project(project, uuid, action_owner = 'auto') {
logger.info('Editing Project ' + project.id);
project.expiration_notif = 0;
await dbsrv.mongo_pending_projects().updateOne({ uuid: uuid }, { $set: project });
let fid = new Date().getTime();
try {
let created_file = await filer.project_update_project(project, fid);
logger.info('File Created: ', created_file);
} catch (error) {
logger.error('Project Update Failed for: ' + action_owner, error);
throw { code: 500, message: 'Project Update Failed' };
}
await dbsrv
.mongo_events()
.insertOne({
Expand Down
2 changes: 1 addition & 1 deletion manager2/src/app/admin/projects/projects.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3>Project creation</h3>
<label for="project_owner">
Owner&nbsp;
<span style="color: red">(required)&nbsp;</span>
<span class="glyphicon glyphicon-question-sign" title="Owner Genouest uid" tooltip> </span>
<span class="glyphicon glyphicon-question-sign" title="Owner uid" tooltip> </span>
</label>
<select id="project_owner" [ngModelOptions]="{ standalone: true }" [(ngModel)]="new_project.owner" class="form-control">
<option *ngFor="let user of all_users" [value]="user.uid">{{ user.uid }}</option>
Expand Down
3 changes: 0 additions & 3 deletions routes/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ router.post('/project', async function (req, res) {
return res.status(500).send({ message: 'Server Error, contact admin' });
}
}

return res.send({ message: 'Project created' });
});

Expand Down Expand Up @@ -222,7 +221,6 @@ router.put('/project', async function (req, res) {
return res.status(500).send({ message: 'Server Error, contact admin' });
}
}

return res.send({ message: 'Project updated' });
});

Expand Down Expand Up @@ -357,7 +355,6 @@ router.post('/project/:id/request/user', async function (req, res) {
return res.status(500).send({ message: 'Server Error, contact admin' });
}
}

return res.send({ message: req.body.request + ' ' + req.body.user + ' done' });
});

Expand Down
Loading