mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-18 15:08:22 +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">
|
||||||
<div class="info-item-top">
|
<div class="info-item-top">
|
||||||
<h3 class="inbl">管理员</h3>
|
<h3 class="inbl">管理员</h3>
|
||||||
{% if is_staff %}
|
|
||||||
<a href="javascript:void(0);" class="grp-admin-add op">添加</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="info-item-bottom">
|
<ul class="info-item-bottom">
|
||||||
{% for member in managers %}
|
{% for member in managers %}
|
||||||
|
@ -658,7 +658,12 @@ def group_add_admin(request, group_id):
|
|||||||
|
|
||||||
# Check whether user is in the group
|
# Check whether user is in the group
|
||||||
if is_group_user(group_id, member_name):
|
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:
|
else:
|
||||||
try:
|
try:
|
||||||
ccnet_threaded_rpc.group_add_member(group_id,
|
ccnet_threaded_rpc.group_add_member(group_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user