Address permissions not maintained correctly #1363
Labels
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core#1363
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observed for the permissions
core.view_address/core.view_addresses.Before the
Addressmodel existed,core.view_addresswas an extra permission onPerson. Now it is calledcore.view_addresses, andcore.view_addressis the default Django permission for theAddressmodel.Problem:
Permission.objects.filter(content_type__app_label="core", codename="view_address")does return 2 results, which should not be the case.Permission.objects.filter(content_type__app_label="core", codename="view_addresses")does not return any result, unless I usemakemigrationsto create a migration that alters the model options andmigrate, which creates thePermission.Possible solutions:
core.view_addressintocore.view_addressesSo, the migration should exist (generally speaking shouldn't
makemigrationschange anything). See !3510 for reference. Of the course, the old permission shouldn't exist anymore.assigned to @hansegucker
Will do this with the general overhaul of address editing.
changed title from
Permissions not maintained correctlytoAddress permissions not maintained correctlymentioned in merge request !3603
mentioned in commit
bbb48f874dPermission.objects.filter(content_type__app_label="core", codename="view_address")still returnes 2 results.created branch
1363-address-permissions-not-maintained-correctlyto address this issuementioned in merge request !3724
mentioned in commit
056926b03d