Skip to content

Notes Entry Permissions Test Cases


Test cases for Notes permissions

Danger

These test cases assume that the method of adding notes is via the view page of the model in question. If this changes, these tests will need to be re-written so that that the actual method of access is tested.

Attributes

item: object

Created Model

Create a new item.

model = Notes

The history Model

namespace: str = ''

URL namespace for the history view

name_view: str = '_history'

URL view name for history

no_permissions_user: User

A User with no permissions to access the item

Create in setUpTestData

different_organization_user: User

A User with the correct permissions to access the item

This user must be in a different organization than the item

Create in setUpTestData

view_user: User

A User with the correct permissions to access the item

This user must be in the same organization as the item

Create in setUpTestData

Functions

test_notes_no_permission_view_denied()

Check correct permission for notes view

Attempt to view with user missing permission

test_notes_has_permission_view_different_organizaiton_denied()

Check correct permission for notes view

Attempt to view with user from different organization

test_notes_has_permission_view()

Check correct permission for notes view

Attempt to view as user with view permission

test_notes_has_permission_add()

Check correct permission for note add

Attempt to add a note as user with no permission

test_notes_has_permission_change()

Check correct permission for notes change

Make change with user who has notes change permission

test_notes_has_permission_delete()

Check correct permission for notes delete

Delete with user who has notes delete permission

About:

This page forms part of our Project Centurion ERP.

Page Metadata
Version: ToDo: place files short git commit here
Date Created: 2024-06-19
Date Edited: 2024-07-09

Contribution:

Would You like to contribute to our Centurion ERP project? You can assist in the following ways:

 

ToDo: Add the page list of contributors