Skip to content

Commit

Permalink
usergroup notifs
Browse files Browse the repository at this point in the history
  • Loading branch information
elg committed Mar 5, 2020
1 parent cef464c commit 6365fed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions passhportd/app/views_mod/usergroup/usergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ 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(),
"[PaSSHport] " + username + " added to " + usergroupname)
return utils.response('OK: "' + username + '" added to "' + \
usergroupname + '"', 200)

Expand Down Expand Up @@ -299,6 +302,8 @@ def usergroup_rmuser():
return utils.response('ERROR: "' + usergroupname + '" -> ' + \
e.message, 409)

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

Expand Down Expand Up @@ -338,6 +343,8 @@ def usergroup_addmanager():
return utils.response('ERROR: "' + usergroupname + '" -> ' + \
e.message, 409)

utils.notif(username + " is now manager of " + usergroupam2Ye + ".",
"[PaSSHport] " + username + " promoted manager of " + usergroupname)
return utils.response('OK: "' + username + '" is manager of "' + \
usergroupname + '"', 200)

Expand Down

0 comments on commit 6365fed

Please sign in to comment.