Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit 5df33830 authored by felix.herrmann's avatar felix.herrmann
Browse files

Merge branch '181-e-mail-notification-dashboard' into 'master'

Resolve "E-Mail notification & dashboard"

Closes #181

See merge request !395
parents 5b6ddd66 67387937
......@@ -13,6 +13,7 @@ from discuss_data.dddatasets.models import (
LanguageTags,
License,
DataSetAccessRequest,
DataSetPublicationRequest,
)
......@@ -38,3 +39,4 @@ admin.site.register(CollectionMethodsTags)
admin.site.register(AnalysisMethodsTags)
admin.site.register(DisciplinesTags)
admin.site.register(DataSetAccessRequest)
admin.site.register(DataSetPublicationRequest)
......@@ -1339,8 +1339,11 @@ class DataSet(models.Model):
logger.error("in request publication")
pub_request = DataSetPublicationRequest.objects.filter(dataset=self, user=user)
# TODO: add a check for compatibility between access model and chosen license
logger.error("not self published if")
if not self.published:
logger.error("pub_request.count() < 1 if")
if pub_request.count() < 1:
logger.error("user_has_admin_right if")
if self.user_has_admin_right(user):
self.dataset_management_object.save()
self.published_main_category = self.get_main_category()
......@@ -1363,8 +1366,10 @@ class DataSet(models.Model):
return _("Dataset publication requested")
else:
logger.error("user has no admin right")
return _("Operation not allowed")
else:
logger.error("pub_request.count() < 1 false")
return _("Dataset publication request pending")
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment