This upgrades the Media Atom Maker to use the latest version of the client for the Guardian's Editorial Permissions service - we need the latest version of the client to support the upgrade to Scala 2.13 in https://github.com/guardian/media-atom-maker/pull/1140
As you can see, the permissions client has moved repositories, to the main permissions repo - this happened in July 2018 with PR https://github.com/guardian/permissions/pull/103. This PR is also important because it removed use of Future from the permissions client API - as Michael Barton explained, permission lookups should be mostly instantaneous because they now come from an in-memory cache.
The removal of Future means that this PR, upgrading Media Atom Maker, needs to remove several for-comprehensions/map-statements. The diff on these can look quite big, but they look smaller if whitespace
changes are ignored. I've taken the opportunity to do small refactors to improve code clarity and remove repetition.
Permission to modify Privacy Status of a published Media Atom
In particular, the code around modifying Privacy Status of a Media Atom had to be changed because it involved removing Future, but I also included refactoring to make the code clearer. When reviewing this, you may want to look at the original PRs that introduced this logic:
https://github.com/guardian/media-atom-maker/pull/694 - allow everyone to upload as Public unless the channel is in the youtube.channels.unlisted config, in which case you need permission. This means we can give general users the ability to upload as Public on the culture channel and grant specific people access to make a public video on the main channel.
This upgrades the Media Atom Maker to use the latest version of the client for the Guardian's Editorial Permissions service - we need the latest version of the client to support the upgrade to Scala 2.13 in https://github.com/guardian/media-atom-maker/pull/1140
Permissions library versions
As you can see, the permissions client has moved repositories, to the main
permissions
repo - this happened in July 2018 with PR https://github.com/guardian/permissions/pull/103. This PR is also important because it removed use ofFuture
from the permissions client API - as Michael Barton explained, permission lookups should be mostly instantaneous because they now come from an in-memory cache.The removal of
Future
means that this PR, upgrading Media Atom Maker, needs to remove several for-comprehensions/map-statements. The diff on these can look quite big, but they look smaller if whitespace changes are ignored. I've taken the opportunity to do small refactors to improve code clarity and remove repetition.Permission to modify Privacy Status of a published Media Atom
In particular, the code around modifying Privacy Status of a Media Atom had to be changed because it involved removing
Future
, but I also included refactoring to make the code clearer. When reviewing this, you may want to look at the original PRs that introduced this logic:youtube.channels.unlisted
config, in which case you need permission. This means we can give general users the ability to upload as Public on the culture channel and grant specific people access to make a public video on the main channel.