From 3dbbe7276baa3b201698e19bfbacbef45a3d8464 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 14 Jul 2021 12:55:28 +0200 Subject: [PATCH] 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 --- plugins/DigitalLibrary/src/DigitalFactoryController.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/plugins/DigitalLibrary/src/DigitalFactoryController.py b/plugins/DigitalLibrary/src/DigitalFactoryController.py index cf4174d7c9..5caaca2e25 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryController.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryController.py @@ -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