diff --git a/client/src/layouts/PublicLayout.vue b/client/src/layouts/PublicLayout.vue index 24089126..7bc3d09b 100644 --- a/client/src/layouts/PublicLayout.vue +++ b/client/src/layouts/PublicLayout.vue @@ -26,15 +26,6 @@ import Logo from '@/components/icons/Logo'; @import "@/styles/_mixins.scss"; @import "@/styles/_default-layout.scss"; - @mixin content-block { - padding-right: $medium-spacing; - padding-left: $medium-spacing; - max-width: 800px; - min-width: 320px; - width: 100%; - margin: 0 auto; - } - .public { grid-template-areas: "h" "c" "f"; diff --git a/client/src/pages/email-verification.vue b/client/src/pages/email-verification.vue index 1ecec566..669f423f 100644 --- a/client/src/pages/email-verification.vue +++ b/client/src/pages/email-verification.vue @@ -13,10 +13,6 @@ import REGISTRATION_MUTATION from '@/graphql/gql/mutations/registration.gql'; export default { - components: {}, - - methods: { - }, data() { return { diff --git a/client/src/styles/_mixins.scss b/client/src/styles/_mixins.scss index d1d0204c..70724481 100644 --- a/client/src/styles/_mixins.scss +++ b/client/src/styles/_mixins.scss @@ -165,3 +165,12 @@ @mixin popover-defaults() { bottom: $popover-default-bottom; } + +@mixin content-block { + padding-right: $medium-spacing; + padding-left: $medium-spacing; + max-width: 800px; + min-width: 320px; + width: 100%; + margin: 0 auto; +} diff --git a/server/core/utils.py b/server/core/utils.py index a50d46a6..28bb4185 100644 --- a/server/core/utils.py +++ b/server/core/utils.py @@ -25,6 +25,8 @@ def set_visible_for(block, visibility_list): def is_private_api_call_allowed(user, body): + # logged in users should only be able to access all resources if they have a valid license + # logged in users without valid license have only access to logout, me & coupon mutations body_unicode = body.decode('utf-8') @@ -34,14 +36,14 @@ def is_private_api_call_allowed(user, body): except AttributeError: return True - # logged in users should only be able to access all resources if the have a valid license - # logged in users without valid license have only access to logout, me & coupon mutations + # logout, me and coupon resources are always allowed. Even if the user has no valid license if re.search(r"mutation\s*.*\s*logout\s*{", body_unicode) or re.search(r"query\s*.*\s*me\s*{", body_unicode)\ or re.search(r"mutation\s*Coupon", body_unicode): return True license_expiry = user.license_expiry_date + # all other resources are denied if the license is not valid if license_expiry is None or license_expiry < timezone.now(): return False