reworked putPermissions call to do all in one call...