fixed getPermissions for table