Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/LibrIT/passhport
Browse files Browse the repository at this point in the history
  • Loading branch information
elg committed Mar 24, 2020
2 parents 284432a + cbef807 commit f2a710f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
19 changes: 9 additions & 10 deletions passhportd/app/views_mod/targetgroup/targetgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def targetgroup_adduser():
return utils.response('ERROR: "' + targetgroupname + '" -> ' + \
e.message, 409)

utils.notif("User " + username + " is now in " + targetgroupname + ".",
utils.notif("User " + username + " is now in " + targetgroupname + ".",
"[PaSSHport] " + username + " joins " + targetgroupname )
return utils.response('OK: "' + username + '" added to "' + \
targetgroupname + '"', 200)
Expand Down Expand Up @@ -286,7 +286,7 @@ def targetgroup_rmuser():
return utils.response('ERROR: "' + targetgroupname + '" -> ' + \
e.message, 409)

utils.notif("User " + username + " has been removed from " + targetgroupname + ".",
utils.notif("User " + username + " has been removed from " + targetgroupname + ".",
"[PaSSHport] " + username + " removed from " + targetgroupname )
return utils.response('OK: "' + username + '" removed from "' + \
targetgroupname + '"', 200)
Expand Down Expand Up @@ -326,8 +326,8 @@ def targetgroup_addtarget():
except exc.SQLAlchemyError as e:
return utils.response('ERROR: "' + targetgroupname + '" -> ' + \
e.message, 409)
utils.notif("Users from " + targetgroupname+ " can now access to " + targetame + ".",

utils.notif("Users from " + targetgroupname+ " can now access to " + targetname + ".",
"[PaSSHport] " + targetname + " access granted to " + targetgroupname )
return utils.response('OK: "' + targetname + '" added to "' + \
targetgroupname + '"', 200)
Expand Down Expand Up @@ -375,7 +375,7 @@ def targetgroup_rmtarget():
e.message, 409)

utils.notif("Users from " + targetgroupname+ " can not access to " + \
targetame + "anymore.",
targetname + "anymore.",
"[PaSSHport] " + targetname + " removed from " + \
targetgroupname )
return utils.response('OK: "' + targetname + '" removed from "' + \
Expand Down Expand Up @@ -418,7 +418,7 @@ def targetgroup_addusergroup():
e.message, 409)

utils.notif("Users from " + usergroupname + \
" can now access to the targets from " + targetgroupame + ".",
" can now access to the targets from " + targetgroupname + ".",
"[PaSSHport] " + usergroupname + " added to " + targetgroupname)
return utils.response('OK: "' + usergroupname + '" added to "' + \
targetgroupname + '"', 200)
Expand Down Expand Up @@ -466,7 +466,7 @@ def targetgroup_rmusergroup():
e.message, 409)

utils.notif("Users from " + usergroupname + \
" lost access to the targets from " + targetgroupame + ".",
" lost access to the targets from " + targetgroupname + ".",
"[PaSSHport] " + usergroupname + " removed from " + \
targetgroupname)
return utils.response('OK: "' + usergroupname + '" removed from "' + \
Expand Down Expand Up @@ -515,7 +515,7 @@ def targetgroup_addtargetgroup():
e.message, 409)

utils.notif("Users from " + subtargetgroupname + \
" can access to the targets from " + targetgroupame + ".",
" can access to the targets from " + targetgroupname + ".",
"[PaSSHport] " + subtargetgroupname + " added to " + \
targetgroupname)
return utils.response('OK: "' + subtargetgroupname + '" added to "' + \
Expand Down Expand Up @@ -566,7 +566,7 @@ def targetgroup_rmtargetgroup():
e.message, 409)

utils.notif("Users from " + subtargetgroupname + \
" removed access to " + targetgroupame + ".",
" removed access to " + targetgroupname + ".",
"[PaSSHport] " + subtargetgroupname + " removed from " + \
targetgroupname)
return utils.response('OK: "' + subtargetgroupname + '" removed from "' + \
Expand All @@ -587,4 +587,3 @@ def targetgroup_access(name):
'" in the database.', 417)

return utils.response(str(data.accessible_target_list(style="names")), 200)

6 changes: 3 additions & 3 deletions passhportd/app/views_mod/usergroup/usergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def usergroup_adduser():
return utils.response('ERROR: "' + usergroupname + '" -> ' + \
e.message, 409)

utils.notif(username + " added to " + usergroupame + ".\n" + \
"He can now access to: \n" + usergroupame.accessible_target_list(),
utils.notif(username + " added to " + usergroupname + ".\n" + \
"He can now access to: \n" + usergroupname.accessible_target_list(),
"[PaSSHport] " + username + " added to " + usergroupname)
return utils.response('OK: "' + username + '" added to "' + \
usergroupname + '"', 200)
Expand Down Expand Up @@ -302,7 +302,7 @@ def usergroup_rmuser():
return utils.response('ERROR: "' + usergroupname + '" -> ' + \
e.message, 409)

utils.notif(username + " removed from " + usergroupam2Ye + ".",
utils.notif(username + " removed from " + usergroupname + ".",
"[PaSSHport] " + username + " removed from " + usergroupname)
return utils.response('OK: "' + username + '" removed from "' + \
usergroupname + '"', 200)
Expand Down

0 comments on commit f2a710f

Please sign in to comment.