Tree Access

Hi All,

I have a peoplecode which adds departments automatically to the department security tree. This is done using Tree class. Now we need to give this functionality to a new set of users who don't have tree/tree manager access. I'm sure tree access is given via Definition Security. I have created a Group, added it to a permission list and assigned to the users via role. Now, when the peoplecode is triggered by these users tree saving is failed. I'm not sure why? I think i'm missing something in the definition security. Can anyone help me identify what is wrong?