Implemented and tested role restriction for recurse.