-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add per-activity CFP reopen, an admin-set time-boxed submission override #581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
82940f8
d673aa7
c91f721
c1cffca
2fe196a
38d2714
1f0346d
d8572c5
8e51951
b3410a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| **/ | ||
| use Libs\ModelSerializers\One2ManyExpandSerializer; | ||
| use models\summit\Presentation; | ||
|
|
||
| /** | ||
|
|
@@ -41,6 +42,29 @@ class AdminPresentationSerializer extends PresentationSerializer | |
| 'OverflowStreamIsSecure' => 'overflow_stream_is_secure:json_boolean', | ||
| 'OverflowStreamKey' => 'overflow_stream_key:json_string', | ||
| 'TrackChairAvgScoresPerRakingType' => 'track_chair_scores_avg:json_string_array', | ||
| 'SubmissionReopenedUntil' => 'submission_reopened_until:datetime_epoch', | ||
| 'SubmissionReopenedById' => 'submission_reopened_by_id:json_int', | ||
| ]; | ||
|
|
||
| /** | ||
| * Declared HERE and not on the base PresentationSerializer on purpose. getExpandsMappings() | ||
| * merges parent into child only, and SubmissionPresentationSerializer is a SIBLING of this | ||
| * class (both extend PresentationSerializer), so this relation is unreachable from the | ||
| * Submission and Public variants. A case in the base expand switch would not be -- that is | ||
| * the leak the Admin-only design exists to prevent, and why the SDS rejected id+expand when | ||
| * a base-class switch was the only mechanism considered. | ||
| * | ||
| * serializer_type is explicit because One2ManyExpandSerializer defaults to Public, which | ||
| * blanks the actor's email. | ||
| */ | ||
| protected static $expand_mappings = [ | ||
| 'submission_reopened_by' => [ | ||
| 'type' => One2ManyExpandSerializer::class, | ||
| 'original_attribute' => 'submission_reopened_by_id', | ||
| 'getter' => 'getSubmissionReopenedBy', | ||
| 'has' => 'hasSubmissionReopenedBy', | ||
| 'serializer_type' => SerializerRegistry::SerializerType_Private, | ||
| ], | ||
| ]; | ||
|
|
||
| protected static $allowed_fields = [ | ||
|
|
@@ -64,7 +88,13 @@ class AdminPresentationSerializer extends PresentationSerializer | |
| 'etherpad_link', | ||
| 'overflow_streaming_url', | ||
| 'overflow_stream_is_secure', | ||
| 'overflow_stream_key' | ||
| 'overflow_stream_key', | ||
| 'submission_reopened_until', | ||
| 'submission_reopened_by_id', | ||
| ]; | ||
|
|
||
| protected static $allowed_relations = [ | ||
| 'submission_reopened_by', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @caseylocker Reviewer note 4 says the SDS rejected the id+expand idiom because the expand switch lives in the base Why it matters beyond style: the flattened string is not consumable. A client that needs the actor's id, or wants to link to the member, has to parse a display string and guess at names containing parentheses. It also cannot be expanded, filtered, or reused, and it bakes a presentation decision into the model layer — Suggested fix: keep protected static $expand_mappings = [
'submission_reopened_by' => [
'type' => One2ManyExpandSerializer::class,
'original_attribute' => 'submission_reopened_by_id',
'getter' => 'getSubmissionReopenedBy',
'has' => 'hasSubmissionReopenedBy',
'serializer_type' => SerializerRegistry::SerializerType_Private,
],
];Show Admin then reads
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in c1cffca. One deliberate detail. The mapping is declared on Covered by On your last point, the SDS amendment: written and open as fntechgit/ftn-docsnsklz#115. It records the shape change, why the subclass local form satisfies the constraint §4 encoded, and the two places the body is now wrong about the shipped contract (§6's "no |
||
| ]; | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.