Class: AtlasRb::System::Work
- Inherits:
-
Object
- Object
- AtlasRb::System::Work
- Extended by:
- FaradayHelper
- Defined in:
- lib/atlas_rb/system/work.rb
Overview
Showcase publishing: link a freshly-created Work into a depositor's featured showcase Collection on their behalf, without granting the depositor themselves standing edit rights on that shared Collection.
Atlas scopes this narrowly on both sides (see Atlas's Ability): the
target Collection must be featured, and the Work must belong to the
on_behalf_of NUID — never an arbitrary or private Work. Cerberus's
WorkDeposit#create_published ("Publish to my community") is the one
caller today.
Always authenticates via FaradayHelper#system_connection, so there is no way to issue this as a regular user.
Constant Summary
Constants included from FaradayHelper
FaradayHelper::ASSERTION_AUDIENCE, FaradayHelper::ASSERTION_ISSUER, FaradayHelper::ASSERTION_TTL, FaradayHelper::INSTRUMENTATION_EVENT
Class Method Summary collapse
-
.add_linked_member(work_id, collection_id, on_behalf_of:) ⇒ Array<String>
The Work's full set of linked Collection noids after the add.
Methods included from FaradayHelper
connection, multipart, system_connection, with_file_part
Class Method Details
.add_linked_member(work_id, collection_id, on_behalf_of:) ⇒ Array<String>
Returns the Work's full set of linked Collection noids after the add.
40 41 42 43 44 45 |
# File 'lib/atlas_rb/system/work.rb', line 40 def self.add_linked_member(work_id, collection_id, on_behalf_of:) JSON.parse( system_connection({ collection_id: collection_id }, on_behalf_of: on_behalf_of) .post("/works/#{work_id}/linked_members")&.body ) end |