Added support for permissions