9 Replies Latest reply on Feb 16, 2010 4:09 AM by Jeff Mesnil

    AddressControl semantics on addRole and deleteRole

    Clebert Suconic Master

      What should be the semantic on addRole?


      I - Semantic on add:


      Say, you had a filter #, adding a role to Guest


      Then, the user calls addRole("Address1", new Role("producer", true, true, false, false.... false));



      As a result of this operation, we will have Gues and producer associated with Address1, while I would expect only producer being associated (as an user).


      This is because the AddressControl will always look for a match before creating the collections. Shouldn't this be using an exact match instead?



      II - Semantic on delete:


      Say you remove all the roles associated with an address. You will end up with an empty match what means nothing is authorized.


      I'm writing a test where I add roles on setup, and delete the roles on tearDown. I would expect deleting all the roles making it a clean record. (What means... removing the match).