ezsystems/ezpublish — pull request #396 by jjCavalleri (2012-08-13 21:25:49+00:00)
Title: Fixed #19519: Two user locations with duplicated policy with language filter fails

Anonymous policies are being loaded twice for users that belong both to this and members roles.
Might probably be a bad practice to add both roles to an user.
Might even be a worst idea to add a policy stating that anonymous can create objects in a certain language.

But since there is no documentation explaining users not to do so, the bug exists under those circumstances.

There are two roads in this fix:
Commit 1 - The loaded policy array should include unique policies (the super_array function should probably go elsewhere)
Commit 2 - While building a language mask, if a language is added twice to the mask, it should not add up twice.