.hgtags
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 19 Oct 2018 13:59:56 +0200
changeset 2972 359177d6a1c8
parent 2966 2c785ecccbbe
child 2976 d55232504250
permissions -rw-r--r--
Delete "container" relation on archive unit when unlinked from a profile - Container machinery got introduced in 143ae7a4a964, at that time the "container" relation was mandatory (on subject) for all entity types. - Integrity of this relation relied on the assumption that the relation was mandatory. (I.e. all entities mush have a link to their container and the only way to remove this link is to remove the container entity itself). - In a88deb387b2b, this assumption got broken as "container" relation was made optional for SEDAArchiveUnit as a subject. From there, when an archive unit got unlinked from a profile (through deletion of the "seda_archive_unit" relation), a "container" relation remained set. - This is problem since permission (especially on "delete" action) relies on the presence or absence of this relation. For instance, one would get an error when trying to delete an archive unit they just unlinked from a profile because they have no rights to delete the profile. So we fix this by dropping the "container" relation when a "seda_archive_unit" relation is deleted through a new hook. Additional test goes in test_entities.py as other container-related tests live there. In migration, we drop spurious "container" relation (not sure there are some).

34aff511359870adb40068fa14aa7b57e4940e6c 0.5.0
34aff511359870adb40068fa14aa7b57e4940e6c debian/0.5.0-1
34aff511359870adb40068fa14aa7b57e4940e6c centos/0.5.0-1
8af441db29850805f30ecbd8d2ed0b04dcb6282f 0.5.1
8af441db29850805f30ecbd8d2ed0b04dcb6282f centos/0.5.1-1
8af441db29850805f30ecbd8d2ed0b04dcb6282f debian/0.5.1-1
9427d51e9dc885f6c3e363cab1bdb7894ee523ea 0.6.0
9427d51e9dc885f6c3e363cab1bdb7894ee523ea debian/0.6.0-1
9427d51e9dc885f6c3e363cab1bdb7894ee523ea centos/0.6.0-1
ec60056b9b1720719fd0549e14ab88b2d85d22b7 0.7.0
ec60056b9b1720719fd0549e14ab88b2d85d22b7 debian/0.7.0-1
ec60056b9b1720719fd0549e14ab88b2d85d22b7 centos/0.7.0-1
100ca5452c458c9c7d60c29ff71dcfb4bcfa350a 0.8.0
100ca5452c458c9c7d60c29ff71dcfb4bcfa350a debian/0.8.0-1
100ca5452c458c9c7d60c29ff71dcfb4bcfa350a centos/0.8.0-1
1db4f425bbffb05d0075df6fdd9e28458507a320 0.9.0
1db4f425bbffb05d0075df6fdd9e28458507a320 debian/0.9.0-1
1db4f425bbffb05d0075df6fdd9e28458507a320 centos/0.9.0-1
746ad8fb9838845216253cd57b6a41208c1cb766 0.10.0
746ad8fb9838845216253cd57b6a41208c1cb766 debian/0.10.0-1
746ad8fb9838845216253cd57b6a41208c1cb766 centos/0.10.0-1
c82265657b763c988691e31303124fce21d75f04 0.10.1
c82265657b763c988691e31303124fce21d75f04 debian/0.10.1-1
c82265657b763c988691e31303124fce21d75f04 centos/0.10.1-1
70cd0b3f5e37200feece7b54fcbf0cdca294619e 0.10.2
70cd0b3f5e37200feece7b54fcbf0cdca294619e debian/0.10.2-1
70cd0b3f5e37200feece7b54fcbf0cdca294619e centos/0.10.2-1
e9adbbfa204f495bb0d2c1d44196793b7e8e122f 0.10.3
e9adbbfa204f495bb0d2c1d44196793b7e8e122f debian/0.10.3-1
e9adbbfa204f495bb0d2c1d44196793b7e8e122f centos/0.10.3-1
90dce3345ca5326f48e146777890e27588745b8a 0.10.4
90dce3345ca5326f48e146777890e27588745b8a debian/0.10.4-1
90dce3345ca5326f48e146777890e27588745b8a centos/0.10.4-1
141f3f7f71a0f657a8dde902f49a01713b22fbf5 0.10.5
141f3f7f71a0f657a8dde902f49a01713b22fbf5 debian/0.10.5-1
141f3f7f71a0f657a8dde902f49a01713b22fbf5 centos/0.10.5-1
ea897ca9b50b5574cb3a2a60e4b6291121dceb67 0.10.6
ea897ca9b50b5574cb3a2a60e4b6291121dceb67 debian/0.10.6-1
ea897ca9b50b5574cb3a2a60e4b6291121dceb67 centos/0.10.6-1
d5a3933285c5221925b69dd2510b00c042401aa9 0.10.7
d5a3933285c5221925b69dd2510b00c042401aa9 debian/0.10.7-1
d5a3933285c5221925b69dd2510b00c042401aa9 centos/0.10.7-1
49dc73cb88316e973b7c6321685b5c5d2caf4bb7 0.11.0
49dc73cb88316e973b7c6321685b5c5d2caf4bb7 debian/0.11.0-1
49dc73cb88316e973b7c6321685b5c5d2caf4bb7 centos/0.11.0-1
444be45eb7d316772f5f1842e03846cea449ba33 0.11.1
444be45eb7d316772f5f1842e03846cea449ba33 debian/0.11.1-1
444be45eb7d316772f5f1842e03846cea449ba33 centos/0.11.1-1
aa91a791182e91a273af416e976d4c3dbeba0618 0.11.2
aa91a791182e91a273af416e976d4c3dbeba0618 debian/0.11.2-1
aa91a791182e91a273af416e976d4c3dbeba0618 centos/0.11.2-1
e13dad7f482bd328cc3ced3910e9f4ecb96fbfe7 0.11.3
e13dad7f482bd328cc3ced3910e9f4ecb96fbfe7 debian/0.11.3-1
e13dad7f482bd328cc3ced3910e9f4ecb96fbfe7 centos/0.11.3-1
56ecfa566925f64cc35df6fa366e1a4c5b9b9932 0.11.4
56ecfa566925f64cc35df6fa366e1a4c5b9b9932 debian/0.11.4-1
56ecfa566925f64cc35df6fa366e1a4c5b9b9932 centos/0.11.4-1
4d31d5d82e35f43146fdb12a48529bddeaae9aea 0.11.5
4d31d5d82e35f43146fdb12a48529bddeaae9aea debian/0.11.5-1
4d31d5d82e35f43146fdb12a48529bddeaae9aea centos/0.11.5-1
17067f4de8d108a52545e2cc19bcd8d4635fe6ee 0.12.0
17067f4de8d108a52545e2cc19bcd8d4635fe6ee debian/0.12.0-1
17067f4de8d108a52545e2cc19bcd8d4635fe6ee centos/0.12.0-1
ca30478c4e21d9d61d12815d7ca0b00f606d94ae 0.13.0-1
ca30478c4e21d9d61d12815d7ca0b00f606d94ae debian/0.13.0-1
ca30478c4e21d9d61d12815d7ca0b00f606d94ae centos/0.13.0-1
dec8827e705ff4e6542d4be6f02d6c5e8cf80a87 0.13.1
f30a729c4a9d6b54ee96b6217cb6a93c5aa3d057 0.13.2
b468ae71bdd8aaa711d31f42d4838dcf264fbc25 0.13.3
0c1e2d29a4935bbbf2eaf0e6145b3bd9059cb951 0.14.0