Added registerPermission