Add merge or not option to setPermissionsAttribute

Ability to be able to merge or not to merge new permissions with the old ones when using setPermissionsAttribute method.