Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.2 #6

Merged
merged 1 commit into from
Apr 6, 2023
Merged
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
49 changes: 0 additions & 49 deletions .circleci/ci/deployment.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .circleci/ci/service.yml

This file was deleted.

107 changes: 0 additions & 107 deletions .circleci/config.yml

This file was deleted.

16 changes: 9 additions & 7 deletions bin/controller.keys.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's a good solution!

Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,15 @@ module.exports.updateKeys = function updateKeys(options, taskCallback) {

// get just the permissions, add users to application
('object' === typeof body && body.length > 0 ? body : []).forEach(function(thisUser) {

_applications[data.sshUser].users[thisUser.login] = {
_id: thisUser.login,
permissions: thisUser.permissions
};
_users[thisUser.login] = _users[thisUser.login] || [];
_users[thisUser.login].push(data._id);
// provide access only for users with roles: `maintain` and `admin`
if (thisUser.role_name == 'maintain' || thisUser.role_name == 'admin') {
_applications[data.sshUser].users[thisUser.login] = {
_id: thisUser.login,
permissions: thisUser.permissions
};
_users[thisUser.login] = _users[thisUser.login] || [];
_users[thisUser.login].push(data._id);
}
});

callback();
Expand Down
3 changes: 3 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 0.2.2
* Prevent access to users with roles: `Read`, `Triage` and `Write`. Provide access only for roles: `Maintain` and `Admin`.

### 0.2.1
* Fixed getPods endpoint for getting pods from all namespaces

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docker-sftp",
"version": "0.2.1",
"version": "0.2.2",
"description": "SSH tunnels to containers",
"main": "bin/server.js",
"scripts": {
Expand Down