1
0
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:
zhengxie 2012-10-20 10:12:29 +08:00
parent ab4d29262c
commit e6b4b58d21
2 changed files with 6 additions and 4 deletions

View File

@ -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 %}

View File

@ -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,