setPermissions deletes permissions, if permissions parameter is null