Change the way new document version are blocked, moving the logic to the documents app from the checkouts app signal handler. Disable the upload new document version button and have the new version upload view redirect to the document version list with a message. GitLab issue #231.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext
|
||||
|
||||
|
||||
class DocumentException(Exception):
|
||||
"""
|
||||
Base documents warning
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class NewDocumentVersionNotAllowed(DocumentException):
|
||||
"""
|
||||
Uploading new versions for this document is not allowed
|
||||
"""
|
||||
pass
|
||||
Reference in New Issue
Block a user