mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Merge pull request #2217 from alphagov/remove-basic-view
Remove basic view setting and preview
This commit is contained in:
@@ -117,10 +117,6 @@ class User(UserMixin):
|
||||
def permissions(self, permissions):
|
||||
raise AttributeError("Read only property")
|
||||
|
||||
@property
|
||||
def previewing_basic_view(self):
|
||||
return bool(session.get('basic'))
|
||||
|
||||
def has_permissions(self, *permissions, restrict_admin_usage=False):
|
||||
unknown_permissions = set(permissions) - all_permissions
|
||||
|
||||
@@ -131,12 +127,6 @@ class User(UserMixin):
|
||||
service_id = _get_service_id_from_view_args()
|
||||
org_id = _get_org_id_from_view_args()
|
||||
|
||||
if self.previewing_basic_view:
|
||||
return self._permissions.get(service_id) and (
|
||||
'send_messages' in permissions or
|
||||
permissions == ()
|
||||
)
|
||||
|
||||
if not service_id and not org_id:
|
||||
# we shouldn't have any pages that require permissions, but don't specify a service or organisation.
|
||||
# use @user_is_platform_admin for platform admin only pages
|
||||
|
||||
Reference in New Issue
Block a user