mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 20:08:19 +00:00
Fix a few bugs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
import simplejson as json
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.contrib import messages
|
||||
from django.http import HttpResponseRedirect, Http404, HttpResponse
|
||||
@@ -8,8 +8,6 @@ from django.template import RequestContext
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
import seaserv
|
||||
|
||||
from seahub.auth.decorators import login_required, login_required_ajax
|
||||
from seahub.notifications.models import Notification, NotificationForm, \
|
||||
UserNotification
|
||||
|
@@ -1341,6 +1341,9 @@ def set_notice_seen_by_id(request):
|
||||
|
||||
@login_required_ajax
|
||||
def repo_remove(request, repo_id):
|
||||
ct = 'application/json; charset=utf-8'
|
||||
result = {}
|
||||
|
||||
if get_system_default_repo_id() == repo_id:
|
||||
result['error'] = _(u'System library can not be deleted.')
|
||||
return HttpResponse(json.dumps(result), status=403, content_type=ct)
|
||||
|
Reference in New Issue
Block a user