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
-2
View File
@@ -18,8 +18,6 @@ class ModelPermission(object):
@classmethod @classmethod
def deregister(cls, model): def deregister(cls, model):
cls._registry.pop(model, None) cls._registry.pop(model, None)
# TODO: Find method to revert the add_to_class('acls'...)
# delattr doesn't work.
@classmethod @classmethod
def get_classes(cls, as_content_type=False): def get_classes(cls, as_content_type=False):
-1
View File
@@ -39,7 +39,6 @@ class AccessControlList(models.Model):
content_object = GenericForeignKey( content_object = GenericForeignKey(
ct_field='content_type', fk_field='object_id', ct_field='content_type', fk_field='object_id',
) )
# TODO: limit choices to the permissions valid for the content_object
permissions = models.ManyToManyField( permissions = models.ManyToManyField(
blank=True, related_name='acls', to=StoredPermission, blank=True, related_name='acls', to=StoredPermission,
verbose_name=_('Permissions') verbose_name=_('Permissions')
-1
View File
@@ -124,7 +124,6 @@ class DetailForm(forms.ModelForm):
field_object, 'help_text', None field_object, 'help_text', None
) )
# TODO: Add others result types <=> Field types
if isinstance(result, models.query.QuerySet): if isinstance(result, models.query.QuerySet):
self.fields[field] = forms.ModelMultipleChoiceField( self.fields[field] = forms.ModelMultipleChoiceField(
queryset=result, label=label queryset=result, label=label
-1
View File
@@ -2,7 +2,6 @@ from django.utils.module_loading import import_string
from .settings import setting_gpg_path 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' SETTING_GPG_BACKEND = 'mayan.apps.django_gpg.classes.PythonGNUPGBackend'
gpg_backend = import_string(SETTING_GPG_BACKEND)( gpg_backend = import_string(SETTING_GPG_BACKEND)(
+1 -1
View File
@@ -1 +1 @@
RETRY_DELAY = 5 # TODO: convert this into a config option RETRY_DELAY = 5
-1
View File
@@ -518,7 +518,6 @@ class APIWorkflowInstanceLogEntryListView(generics.ListCreateAPIView):
Failing that, check for ACLs for any of the workflow's transitions. Failing that, check for ACLs for any of the workflow's transitions.
Failing that, then raise PermissionDenied Failing that, then raise PermissionDenied
""" """
# TODO: Improvement above
AccessControlList.objects.check_access( AccessControlList.objects.check_access(
obj=document, permissions=(permission_workflow_view,), obj=document, permissions=(permission_workflow_view,),
user=self.request.user user=self.request.user
@@ -69,7 +69,6 @@ class Document(models.Model):
'Whether or not this document is in the trash.' 'Whether or not this document is in the trash.'
), editable=False, verbose_name=_('In trash?') ), editable=False, verbose_name=_('In trash?')
) )
# TODO: set editable to False
deleted_date_time = models.DateTimeField( deleted_date_time = models.DateTimeField(
blank=True, editable=True, help_text=_( blank=True, editable=True, help_text=_(
'The server date and time when the document was moved to the ' 'The server date and time when the document was moved to the '
@@ -254,7 +254,6 @@ class DocumentDownloadView(SingleObjectDownloadView):
target=item target=item
) )
else: else:
# TODO: Improve by adding a document version download event
event_document_download.commit( event_document_download.commit(
actor=request.user, actor=request.user,
target=item.document target=item.document
-1
View File
@@ -383,7 +383,6 @@ class DocumentVersionUploadInteractiveView(UploadBaseView):
klass=Document, pk=kwargs['document_pk'] klass=Document, pk=kwargs['document_pk']
) )
# TODO: Try to remove this new version block check from here
if NewVersionBlock.objects.is_blocked(self.document): if NewVersionBlock.objects.is_blocked(self.document):
messages.error( messages.error(
message=_( message=_(
-1
View File
@@ -201,7 +201,6 @@ class TagDocumentAPIViewTestCase(
response = self._request_test_document_attach_tag_api_view() response = self._request_test_document_attach_tag_api_view()
self.assertEqual(response.status_code, status.HTTP_201_CREATED) 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()) self.assertTrue(self.test_tag in self.test_document.tags.all())
def test_document_attach_tag_view_with_full_access(self): def test_document_attach_tag_view_with_full_access(self):
@@ -70,8 +70,6 @@ class GroupEventsAPITestCase(
action = Action.objects.last() 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.actor, self.test_group)
self.assertEqual(action.target, self.test_group) self.assertEqual(action.target, self.test_group)
self.assertEqual(action.verb, event_group_created.id) self.assertEqual(action.verb, event_group_created.id)
@@ -89,8 +87,6 @@ class GroupEventsAPITestCase(
action = Action.objects.last() 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.actor, self.test_group)
self.assertEqual(action.target, self.test_group) self.assertEqual(action.target, self.test_group)
self.assertEqual(action.verb, event_group_edited.id) self.assertEqual(action.verb, event_group_edited.id)
@@ -185,8 +181,6 @@ class UserEventsAPITestCase(
action = Action.objects.last() 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.actor, self.test_user)
self.assertEqual(action.target, self.test_user) self.assertEqual(action.target, self.test_user)
self.assertEqual(action.verb, event_user_created.id) self.assertEqual(action.verb, event_user_created.id)
@@ -203,8 +197,6 @@ class UserEventsAPITestCase(
action = Action.objects.last() 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.actor, self.test_user)
self.assertEqual(action.target, self.test_user) self.assertEqual(action.target, self.test_user)
self.assertEqual(action.verb, event_user_edited.id) self.assertEqual(action.verb, event_user_edited.id)