mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 22:01:06 +00:00
[grp lib] bugfix & improvement
This commit is contained in:
@@ -3166,8 +3166,7 @@ class GroupRepo(APIView):
|
||||
group_id = group.id
|
||||
|
||||
if not group.is_staff and not seafile_api.is_repo_owner(username, repo_id):
|
||||
return api_error(status.HTTP_403_FORBIDDEN,
|
||||
'You do not have permission to delete repo.')
|
||||
return api_error(status.HTTP_403_FORBIDDEN, 'Permission denied.')
|
||||
|
||||
if seaserv.is_org_group(group_id):
|
||||
org_id = seaserv.get_org_id_by_group(group_id)
|
||||
|
@@ -173,7 +173,7 @@
|
||||
</table>
|
||||
|
||||
<div class="empty-tips" style="margin-bottom:150px; display:none;">
|
||||
<h2 class="alc">{% trans "No library is sharing to this group" %}</h2>
|
||||
<h2 class="alc">{% trans "No library is shared to this group" %}</h2>
|
||||
<p>{% blocktrans %}You can share libraries by clicking the "New Library" button above or the "Share" icon on your libraries list.{% endblocktrans %}</p>
|
||||
<p>{% trans "Libraries shared as writable can be downloaded and synced by other group members. Read only libraries can only be downloaded, updates by others will not be uploaded." %}</p>
|
||||
</div>
|
||||
|
@@ -44,13 +44,21 @@ define([
|
||||
},
|
||||
|
||||
unshare: function() {
|
||||
var lib_name = this.model.get('name');
|
||||
this.model.destroy({
|
||||
wait: true,
|
||||
success: function(model, rep) {
|
||||
Common.feedback(gettext('Success'), 'success', Common.SUCCESS_TIMOUT);
|
||||
success: function() {
|
||||
var msg = gettext('Successfully unshared {placeholder}').replace('{placeholder}', '<span class="op-target">' + Common.HTMLescape(lib_name) + '</span>');
|
||||
Common.feedback(msg, 'success', Common.SUCCESS_TIMOUT);
|
||||
},
|
||||
error: function() {
|
||||
Common.feedback(gettext('Error'), 'error', Common.ERROR_TIMEOUT);
|
||||
error: function(model, response) {
|
||||
var err;
|
||||
if (response.responseText) {
|
||||
err = $.parseJSON(response.responseText).error_msg;
|
||||
} else {
|
||||
err = gettext("Failed. Please check the network.");
|
||||
}
|
||||
Common.feedback(err, 'error');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user