diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68ee8e77d..4120a2fdf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* Disable buttons and menu entries when user does not have permissions
* Fix save error for user fields
* Ensure custom fonts are loaded before rendering charts and diagrams
+* Remove status emoji of notes
## v2023.145 - 2023-12-11
diff --git a/api/src/reportcreator_api/archive/import_export/serializers.py b/api/src/reportcreator_api/archive/import_export/serializers.py
index e9b258831..07047038e 100644
--- a/api/src/reportcreator_api/archive/import_export/serializers.py
+++ b/api/src/reportcreator_api/archive/import_export/serializers.py
@@ -407,13 +407,12 @@ class Meta:
model = ProjectNotebookPage
fields = [
'id', 'created', 'updated',
- 'title', 'text', 'checked', 'icon_emoji', 'status_emoji', 'assignee',
+ 'title', 'text', 'checked', 'icon_emoji', 'assignee',
'order', 'parent',
]
extra_kwargs = {
'created': {'read_only': False, 'required': False},
'icon_emoji': {'required': False},
- 'status_emoji': {'required': False},
'assignee': {'required': False}
}
diff --git a/api/src/reportcreator_api/pentests/migrations/0047_remove_historicalprojectnotebookpage_status_emoji_and_more.py b/api/src/reportcreator_api/pentests/migrations/0047_remove_historicalprojectnotebookpage_status_emoji_and_more.py
new file mode 100644
index 000000000..82df7dd23
--- /dev/null
+++ b/api/src/reportcreator_api/pentests/migrations/0047_remove_historicalprojectnotebookpage_status_emoji_and_more.py
@@ -0,0 +1,25 @@
+# Generated by Django 4.2.7 on 2023-12-14 09:09
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('pentests', '0046_history_encryption'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='historicalprojectnotebookpage',
+ name='status_emoji',
+ ),
+ migrations.RemoveField(
+ model_name='projectnotebookpage',
+ name='status_emoji',
+ ),
+ migrations.RemoveField(
+ model_name='usernotebookpage',
+ name='status_emoji',
+ ),
+ ]
diff --git a/api/src/reportcreator_api/pentests/models/notes.py b/api/src/reportcreator_api/pentests/models/notes.py
index ac929e9e7..5d3f2ed08 100644
--- a/api/src/reportcreator_api/pentests/models/notes.py
+++ b/api/src/reportcreator_api/pentests/models/notes.py
@@ -18,7 +18,6 @@ class Meta:
text = EncryptedField(base_field=models.TextField(default=''))
checked = models.BooleanField(null=True, blank=True)
icon_emoji = models.CharField(max_length=32, null=True, blank=True)
- status_emoji = models.CharField(max_length=32, null=True, blank=True)
parent = models.ForeignKey(to='self', on_delete=models.CASCADE, null=True, blank=True)
order = models.PositiveIntegerField()
diff --git a/api/src/reportcreator_api/pentests/serializers/notes.py b/api/src/reportcreator_api/pentests/serializers/notes.py
index 1166fecff..54f5163b5 100644
--- a/api/src/reportcreator_api/pentests/serializers/notes.py
+++ b/api/src/reportcreator_api/pentests/serializers/notes.py
@@ -17,7 +17,7 @@ class NotebookPageSerializerBase(serializers.ModelSerializer):
class Meta:
fields = [
'id', 'created', 'updated', 'lock_info',
- 'title', 'text', 'checked', 'icon_emoji', 'status_emoji',
+ 'title', 'text', 'checked', 'icon_emoji',
'order', 'parent',
]
extra_kwargs = {
diff --git a/api/src/reportcreator_api/tests/mock.py b/api/src/reportcreator_api/tests/mock.py
index 8114af0c0..e9c581e1f 100644
--- a/api/src/reportcreator_api/tests/mock.py
+++ b/api/src/reportcreator_api/tests/mock.py
@@ -188,7 +188,6 @@ def create_usernotebookpage(**kwargs) -> UserNotebookPage:
'text': 'Note text',
'checked': random.choice([None, True, False]),
'icon_emoji': random.choice([None, '🦖']),
- 'status_emoji': random.choice([None, '✔️', '🤡']),
} | kwargs)
@@ -198,7 +197,6 @@ def create_projectnotebookpage(**kwargs) -> ProjectNotebookPage:
'text': 'Note text',
'checked': random.choice([None, True, False]),
'icon_emoji': random.choice([None, '🦖']),
- 'status_emoji': random.choice([None, '✔️', '🤡']),
} | kwargs)
diff --git a/api/src/reportcreator_api/tests/test_import_export.py b/api/src/reportcreator_api/tests/test_import_export.py
index bf9c88c1b..67aeadae5 100644
--- a/api/src/reportcreator_api/tests/test_import_export.py
+++ b/api/src/reportcreator_api/tests/test_import_export.py
@@ -175,7 +175,7 @@ def test_export_import_project_all(self):
assert p.notes.count() == self.project.notes.count()
for i, s in zip(p.notes.order_by('note_id'), self.project.notes.order_by('note_id')):
- assertKeysEqual(i, s, ['note_id', 'created', 'title', 'text', 'checked', 'icon_emoji', 'status_emoji', 'order'])
+ assertKeysEqual(i, s, ['note_id', 'created', 'title', 'text', 'checked', 'icon_emoji', 'order'])
assert i.parent.note_id == s.parent.note_id if s.parent else i.parent is None
assert {(f.name, f.file.read()) for f in p.files.all()} == {(f.name, f.file.read()) for f in self.project.files.all()}
@@ -373,7 +373,7 @@ def test_copy_project(self):
for p_n, cp_n in zip(p.notes.order_by('note_id'), cp.notes.order_by('note_id')):
assert p_n != cp_n
- assertKeysEqual(p_n, cp_n, ['note_id', 'title', 'text', 'checked', 'icon_emoji', 'status_emoji', 'order'])
+ assertKeysEqual(p_n, cp_n, ['note_id', 'title', 'text', 'checked', 'icon_emoji', 'order'])
assert not cp_f.is_locked
if p_n.parent:
assert p_n.parent.note_id == cp_n.parent.note_id
diff --git a/frontend/src/components/Design/CreateDesignDialog.vue b/frontend/src/components/Design/CreateDesignDialog.vue
index 1933cab6f..a3903368a 100644
--- a/frontend/src/components/Design/CreateDesignDialog.vue
+++ b/frontend/src/components/Design/CreateDesignDialog.vue
@@ -18,12 +18,6 @@
:required="false"
autofocus
/>
-
@@ -52,23 +46,28 @@
diff --git a/frontend/src/pages/designs/private.vue b/frontend/src/pages/designs/private.vue
index 5dbf4c40d..78bbd1810 100644
--- a/frontend/src/pages/designs/private.vue
+++ b/frontend/src/pages/designs/private.vue
@@ -3,10 +3,10 @@
Designs
-
-
+
+
-
+
@@ -27,6 +27,7 @@ useHeadExtended({
});
const route = useRoute();
+const apiSettings = useApiSettings();
const importBtnRef = ref();
diff --git a/frontend/src/pages/notes/personal/[noteId].vue b/frontend/src/pages/notes/personal/[noteId].vue
index 4d45ceb70..671eed9fe 100644
--- a/frontend/src/pages/notes/personal/[noteId].vue
+++ b/frontend/src/pages/notes/personal/[noteId].vue
@@ -29,12 +29,6 @@
v-bind="inputFieldAttrs"
class="note-title"
/>
-
-
@@ -81,7 +75,6 @@ const { readonly, toolbarAttrs, fetchLoaderAttrs } = useLockEdit({
updateInStore: n => userNotesStore.setNote(n!),
autoSaveOnUpdateData({ oldValue, newValue }): boolean {
return oldValue!.checked !== newValue!.checked ||
- oldValue!.status_emoji !== newValue!.status_emoji ||
oldValue!.icon_emoji !== newValue!.icon_emoji;
}
});
diff --git a/frontend/src/pages/projects/[projectId]/index.vue b/frontend/src/pages/projects/[projectId]/index.vue
index 201c2e9d3..017f179d5 100644
--- a/frontend/src/pages/projects/[projectId]/index.vue
+++ b/frontend/src/pages/projects/[projectId]/index.vue
@@ -7,12 +7,12 @@
({
hasEditPermissions: computed(() => {
if (project.value?.readonly) {
return false;
- } else if (!auth.permissions.update_project_settings) {
+ } else if (!auth.permissions.value.update_project_settings) {
return false;
}
return true;
}),
- canDelete: computed(() => auth.permissions.delete_projects),
+ canDelete: computed(() => auth.permissions.value.delete_projects),
errorMessage: computed(() => {
if (project.value?.readonly) {
return 'This project is finished and cannot be changed anymore. In order to edit this project, re-activate it in the project settings.'
diff --git a/frontend/src/pages/projects/[projectId]/notes/[noteId]/history/[historyDate].vue b/frontend/src/pages/projects/[projectId]/notes/[noteId]/history/[historyDate].vue
index b1c2883c7..9cf39980f 100644
--- a/frontend/src/pages/projects/[projectId]/notes/[noteId]/history/[historyDate].vue
+++ b/frontend/src/pages/projects/[projectId]/notes/[noteId]/history/[historyDate].vue
@@ -29,12 +29,6 @@
v-bind="inputFieldAttrs"
class="note-title"
/>
-
-
diff --git a/frontend/src/pages/projects/[projectId]/notes/[noteId]/index.vue b/frontend/src/pages/projects/[projectId]/notes/[noteId]/index.vue
index 37c7c50c4..2fae9d449 100644
--- a/frontend/src/pages/projects/[projectId]/notes/[noteId]/index.vue
+++ b/frontend/src/pages/projects/[projectId]/notes/[noteId]/index.vue
@@ -29,12 +29,6 @@
v-bind="inputFieldAttrs"
class="note-title"
/>
-
-
@@ -100,7 +94,6 @@ const { data: note, project, readonly, toolbarAttrs, fetchLoaderAttrs, inputFiel
updateInStore: projectStore.setNote,
autoSaveOnUpdateData({ oldValue, newValue }): boolean {
return oldValue.checked !== newValue.checked ||
- oldValue.status_emoji !== newValue.status_emoji ||
oldValue.icon_emoji !== newValue.icon_emoji ||
oldValue.assignee?.id !== newValue.assignee?.id;
}
diff --git a/frontend/src/pages/projects/[projectId]/publish.vue b/frontend/src/pages/projects/[projectId]/publish.vue
index ccdbed892..8a7b309bf 100644
--- a/frontend/src/pages/projects/[projectId]/publish.vue
+++ b/frontend/src/pages/projects/[projectId]/publish.vue
@@ -33,7 +33,7 @@
button-icon="mdi-file-cog"
tooltip-text="Customize Design for this project"
dialog-text="Customize the current Design for this project. This allows you to adapt the appearence (HTML, CSS) of the design for this project only. The original design is not affected. Any changes made to the original design will not be automatically applied to the adapted design."
- :disabled="project.readonly || projectType.source === 'customized' || !auth.permissions.update_project_settings"
+ :disabled="project.readonly || projectType.source === 'customized' || !auth.permissions.value.update_project_settings"
class="ml-1"
/>
@@ -78,7 +78,7 @@
v-if="!project.readonly"
:value="project.readonly"
:set-readonly="setReadonly"
- :disabled="!canGenerateFinalReport || !auth.permissions.update_project_settings"
+ :disabled="!canGenerateFinalReport || !auth.permissions.value.update_project_settings"
/>
diff --git a/frontend/src/pages/projects/[projectId]/reporting/findings/[findingId]/index.vue b/frontend/src/pages/projects/[projectId]/reporting/findings/[findingId]/index.vue
index bdfc8fcb5..27a26721a 100644
--- a/frontend/src/pages/projects/[projectId]/reporting/findings/[findingId]/index.vue
+++ b/frontend/src/pages/projects/[projectId]/reporting/findings/[findingId]/index.vue
@@ -7,7 +7,7 @@
:to="{path: '/templates/fromfinding/', query: {project: project.id, finding: finding.id}}"
prepend-icon="mdi-view-compact"
title="Save as template"
- :disabled="!auth.permissions.template_editor"
+ :disabled="!auth.permissions.value.template_editor"
/>
diff --git a/frontend/src/pages/projects/index.vue b/frontend/src/pages/projects/index.vue
index 00f571a53..f4638b63c 100644
--- a/frontend/src/pages/projects/index.vue
+++ b/frontend/src/pages/projects/index.vue
@@ -3,8 +3,8 @@
Projects
-
-
+
+
diff --git a/frontend/src/pages/templates/[templateId]/index.vue b/frontend/src/pages/templates/[templateId]/index.vue
index e27f95d8d..3756d499f 100644
--- a/frontend/src/pages/templates/[templateId]/index.vue
+++ b/frontend/src/pages/templates/[templateId]/index.vue
@@ -21,7 +21,7 @@
@@ -69,7 +69,7 @@ const { toolbarAttrs, fetchLoaderAttrs, readonly } = useLockEdit({
fetchState,
baseUrl,
toolbarRef: computed(() => (vm?.refs?.templateEditor as any)?.toolbarRef),
- hasEditPermissions: computed(() => auth.permissions.template_editor),
+ hasEditPermissions: computed(() => auth.permissions.value.template_editor),
performSave: async (data) => {
const res = await templateStore.update(data!);
for (const tr of template.value!.translations) {
diff --git a/frontend/src/pages/templates/index.vue b/frontend/src/pages/templates/index.vue
index 61548db43..3148c9b79 100644
--- a/frontend/src/pages/templates/index.vue
+++ b/frontend/src/pages/templates/index.vue
@@ -29,12 +29,12 @@
diff --git a/frontend/src/pages/users/[userId]/identities.vue b/frontend/src/pages/users/[userId]/identities.vue
index a0a47bbf9..0bb857d49 100644
--- a/frontend/src/pages/users/[userId]/identities.vue
+++ b/frontend/src/pages/users/[userId]/identities.vue
@@ -80,7 +80,7 @@ const createWizard = ref({
identifier: '',
},
});
-const canEdit = computed(() => auth.permissions.user_manager && !user.value.is_system_user);
+const canEdit = computed(() => auth.permissions.value.user_manager && !user.value.is_system_user);
async function createIdentity() {
try {
diff --git a/frontend/src/pages/users/[userId]/index.vue b/frontend/src/pages/users/[userId]/index.vue
index 2e4031047..a37fac40e 100644
--- a/frontend/src/pages/users/[userId]/index.vue
+++ b/frontend/src/pages/users/[userId]/index.vue
@@ -65,7 +65,7 @@ const apiUrl = `/api/v1/pentestusers/${route.params.userId}/`
const user = await useFetchE(apiUrl, { method: 'GET' });
const serverErrors = ref(null);
-const canEdit = computed(() => auth.permissions.user_manager && !user.value.is_system_user);
+const canEdit = computed(() => auth.permissions.value.user_manager && !user.value.is_system_user);
async function performSave(data: User) {
try {
diff --git a/frontend/src/pages/users/[userId]/mfa.vue b/frontend/src/pages/users/[userId]/mfa.vue
index 2574c34d8..e3cc1fc0e 100644
--- a/frontend/src/pages/users/[userId]/mfa.vue
+++ b/frontend/src/pages/users/[userId]/mfa.vue
@@ -37,7 +37,7 @@ const auth = useAuth();
const user = await useFetchE(`/api/v1/pentestusers/${route.params.userId}/`, { method: 'GET' })
const mfaMethods = await useFetchE(`/api/v1/pentestusers/${route.params.userId}/mfa/`, { method: 'GET' });
-const canEdit = computed(() => auth.permissions.user_manager && !user.value.is_system_user)
+const canEdit = computed(() => auth.permissions.value.user_manager && !user.value.is_system_user)
async function deleteMfaMethod(mfaMethod: MfaMethod) {
return await $fetch(`/api/v1/pentestusers/${route.params.userId}/mfa/${mfaMethod.id}/`, { method: 'DELETE' });
diff --git a/frontend/src/pages/users/[userId]/reset-password.vue b/frontend/src/pages/users/[userId]/reset-password.vue
index 8a40eaacd..022d805e9 100644
--- a/frontend/src/pages/users/[userId]/reset-password.vue
+++ b/frontend/src/pages/users/[userId]/reset-password.vue
@@ -35,7 +35,7 @@ const user = await useFetchE(`/api/v1/pentestusers/${route.params.userId}/
const password = ref(null);
const serverErrors = ref(null);
-const canEdit = computed(() => auth.permissions.user_manager && !user.value!.is_system_user);
+const canEdit = computed(() => auth.permissions.value.user_manager && !user.value!.is_system_user);
const form = ref();
async function changePassword() {
diff --git a/frontend/src/pages/users/index.vue b/frontend/src/pages/users/index.vue
index 352b4447f..1c0dac732 100644
--- a/frontend/src/pages/users/index.vue
+++ b/frontend/src/pages/users/index.vue
@@ -4,7 +4,7 @@
diff --git a/frontend/src/utils/types.ts b/frontend/src/utils/types.ts
index 4b9397a77..8674b6c21 100644
--- a/frontend/src/utils/types.ts
+++ b/frontend/src/utils/types.ts
@@ -281,7 +281,6 @@ export type UserNote = BaseModel & Lockable & {
text: string;
checked: boolean|null;
icon_emoji: string;
- status_emoji: string;
}
export type ProjectNote = UserNote & {