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:
Roberto Rosario
2015-10-23 06:06:59 -04:00
parent 414c55f824
commit da4c41c5b2
16 changed files with 395 additions and 141 deletions
-15
View File
@@ -10,13 +10,6 @@ class DocumentCheckoutError(Exception):
pass
class DocumentCheckoutWarning(Warning):
"""
Base checkout warning
"""
pass
class DocumentNotCheckedOut(DocumentCheckoutError):
"""
Raised when trying to checkin a document that is not checkedout
@@ -30,11 +23,3 @@ class DocumentAlreadyCheckedOut(DocumentCheckoutError):
"""
def __unicode__(self):
return ugettext('Document already checked out.')
class NewDocumentVersionNotAllowed(DocumentCheckoutWarning):
"""
Uploading new versions for this document is not allowed
Current reasons: Document is in checked out state
"""
pass