Remove TODO remarks

Converted to entries in the ticket system.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-23 12:58:54 -04:00
parent c9746b5813
commit 4ea1a208eb
11 changed files with 1 additions and 19 deletions

View File

@@ -18,8 +18,6 @@ class ModelPermission(object):
@classmethod
def deregister(cls, model):
cls._registry.pop(model, None)
# TODO: Find method to revert the add_to_class('acls'...)
# delattr doesn't work.
@classmethod
def get_classes(cls, as_content_type=False):

View File

@@ -39,7 +39,6 @@ class AccessControlList(models.Model):
content_object = GenericForeignKey(
ct_field='content_type', fk_field='object_id',
)
# TODO: limit choices to the permissions valid for the content_object
permissions = models.ManyToManyField(
blank=True, related_name='acls', to=StoredPermission,
verbose_name=_('Permissions')

View File

@@ -124,7 +124,6 @@ class DetailForm(forms.ModelForm):
field_object, 'help_text', None
)
# TODO: Add others result types <=> Field types
if isinstance(result, models.query.QuerySet):
self.fields[field] = forms.ModelMultipleChoiceField(
queryset=result, label=label

View File

@@ -2,7 +2,6 @@ from django.utils.module_loading import import_string
from .settings import setting_gpg_path
# TODO: This will become an setting option in 2.2
SETTING_GPG_BACKEND = 'mayan.apps.django_gpg.classes.PythonGNUPGBackend'
gpg_backend = import_string(SETTING_GPG_BACKEND)(

View File

@@ -1 +1 @@
RETRY_DELAY = 5 # TODO: convert this into a config option
RETRY_DELAY = 5

View File

@@ -518,7 +518,6 @@ class APIWorkflowInstanceLogEntryListView(generics.ListCreateAPIView):
Failing that, check for ACLs for any of the workflow's transitions.
Failing that, then raise PermissionDenied
"""
# TODO: Improvement above
AccessControlList.objects.check_access(
obj=document, permissions=(permission_workflow_view,),
user=self.request.user

View File

@@ -69,7 +69,6 @@ class Document(models.Model):
'Whether or not this document is in the trash.'
), editable=False, verbose_name=_('In trash?')
)
# TODO: set editable to False
deleted_date_time = models.DateTimeField(
blank=True, editable=True, help_text=_(
'The server date and time when the document was moved to the '

View File

@@ -254,7 +254,6 @@ class DocumentDownloadView(SingleObjectDownloadView):
target=item
)
else:
# TODO: Improve by adding a document version download event
event_document_download.commit(
actor=request.user,
target=item.document

View File

@@ -383,7 +383,6 @@ class DocumentVersionUploadInteractiveView(UploadBaseView):
klass=Document, pk=kwargs['document_pk']
)
# TODO: Try to remove this new version block check from here
if NewVersionBlock.objects.is_blocked(self.document):
messages.error(
message=_(

View File

@@ -201,7 +201,6 @@ class TagDocumentAPIViewTestCase(
response = self._request_test_document_attach_tag_api_view()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
# TODO: This should be false. Update API View.
self.assertTrue(self.test_tag in self.test_document.tags.all())
def test_document_attach_tag_view_with_full_access(self):

View File

@@ -70,8 +70,6 @@ class GroupEventsAPITestCase(
action = Action.objects.last()
# TODO: Future improvement, find method to record the user who
# commited the event. Will required custom serializer .create method
self.assertEqual(action.actor, self.test_group)
self.assertEqual(action.target, self.test_group)
self.assertEqual(action.verb, event_group_created.id)
@@ -89,8 +87,6 @@ class GroupEventsAPITestCase(
action = Action.objects.last()
# TODO: Future improvement, find method to record the user who
# commited the event. Will required custom serializer .update method
self.assertEqual(action.actor, self.test_group)
self.assertEqual(action.target, self.test_group)
self.assertEqual(action.verb, event_group_edited.id)
@@ -185,8 +181,6 @@ class UserEventsAPITestCase(
action = Action.objects.last()
# TODO: Future improvement, find method to record the user who
# commited the event. Will required custom serializer .create method
self.assertEqual(action.actor, self.test_user)
self.assertEqual(action.target, self.test_user)
self.assertEqual(action.verb, event_user_created.id)
@@ -203,8 +197,6 @@ class UserEventsAPITestCase(
action = Action.objects.last()
# TODO: Future improvement, find method to record the user who
# commited the event. Will required custom serializer .update method
self.assertEqual(action.actor, self.test_user)
self.assertEqual(action.target, self.test_user)
self.assertEqual(action.verb, event_user_edited.id)