mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +00:00
Enable setting group admin when user is already in group
This commit is contained in:
parent
ab4d29262c
commit
e6b4b58d21
@ -20,9 +20,6 @@
|
||||
<div class="info-item">
|
||||
<div class="info-item-top">
|
||||
<h3 class="inbl">管理员</h3>
|
||||
{% if is_staff %}
|
||||
<a href="javascript:void(0);" class="grp-admin-add op">添加</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<ul class="info-item-bottom">
|
||||
{% for member in managers %}
|
||||
|
@ -658,7 +658,12 @@ def group_add_admin(request, group_id):
|
||||
|
||||
# Check whether user is in the group
|
||||
if is_group_user(group_id, member_name):
|
||||
pass
|
||||
try:
|
||||
ccnet_threaded_rpc.group_set_admin(group_id, member_name)
|
||||
except SearpcError, e:
|
||||
result['error'] = _(e.msg)
|
||||
return HttpResponse(json.dumps(result), status=500,
|
||||
content_type=content_type)
|
||||
else:
|
||||
try:
|
||||
ccnet_threaded_rpc.group_add_member(group_id,
|
||||
|
Loading…
Reference in New Issue
Block a user