added custom permissions control