Ticket #2075 (new defect)

Opened 7 years ago

Return undef from object constructer if metadata_visiblity set

Reported by: tmb Owned by: cjg
Priority: unset Milestone: EPrints Wishlist
Component: - Version:
Severity: normal Keywords:
Cc:

Description

Just an idea: rather than having to remember to check the metadata_visibility field on an EPrint object before using it, make the default that EPrint::DataObj::EPrint->new returns undef on hidden eprints *unless* an extra "force" option is set e.g. EPrint::DataObj::EPrint->new( $session, 1, reveal => 1 ). This might help programmers avoid accidentally exposing hidden eprints, and older scripts could be run safely without modification as well.

Note: See TracTickets for help on using tickets.