mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 19:37:28 +00:00
update admin log
1. add log when admin create repo 1. add log when admin batch delete user 1. update test
This commit is contained in:
@@ -712,16 +712,17 @@ def user_remove(request, email):
|
||||
|
||||
user.delete()
|
||||
messages.success(request, _(u'Successfully deleted %s') % user.username)
|
||||
|
||||
# send admin operation log signal
|
||||
admin_op_detail = {
|
||||
"email": email,
|
||||
}
|
||||
admin_operation.send(sender=None, admin_name=request.user.username,
|
||||
operation=USER_DELETE, detail=admin_op_detail)
|
||||
|
||||
except User.DoesNotExist:
|
||||
messages.error(request, _(u'Failed to delete: the user does not exist'))
|
||||
|
||||
# send admin operation log signal
|
||||
admin_op_detail = {
|
||||
"email": email,
|
||||
}
|
||||
admin_operation.send(sender=None, admin_name=request.user.username,
|
||||
operation=USER_DELETE, detail=admin_op_detail)
|
||||
|
||||
return HttpResponseRedirect(next)
|
||||
|
||||
@login_required
|
||||
|
Reference in New Issue
Block a user