Remove check for account subscriptions

Since the variable `self._user_has_access` already contains the information on whether the user can access the Digital Library.

CURA-8112
This commit is contained in:
Konstantinos Karmas 2021-07-14 12:55:28 +02:00
parent 11f66b2a78
commit 3dbbe7276b

View file

@ -166,14 +166,7 @@ class DigitalFactoryController(QObject):
:return: True if the user account has Digital Library access, else False
"""
if self._account.userProfile:
subscriptions = self._account.userProfile.get("subscriptions", [])
if len(subscriptions) > 0:
return True
if self._user_has_access:
# The user has access even though they have no subscriptions. This means they are an Essential user and they
# have limited personal private projects available. In this case, we need to check whether they have already
# reached their limit.
self._api.checkUserCanCreateNewLibraryProject(callback = self.setCanCreateNewLibraryProject)
return self._user_has_access