vj4 icon indicating copy to clipboard operation
vj4 copied to clipboard

Support setting record publicity

Open breezewish opened this issue 7 years ago • 7 comments

#230

  • [x] Add option to change "default source code publicity" in user preference (@breeswish)
  • [x] Allow overridding the publicity for specific submission when submitting [deprecated: user can change publicity after submission] (@breeswish)
  • [x] Allow changing publicity for specific submission in submission_detail (@breeswish)
  • [x] Check publicity according to new rules (@twd2)

Domain overriding publicity setting is intended to be out of this PR's scope.

breezewish avatar Aug 05 '17 15:08 breezewish

Discuss: is EDIT_RECORD_VISIBILITY(_SELF) a perm or a priv?

twd2 avatar Aug 12 '17 18:08 twd2

I think "publicity" is more accurate than "visibility".

breezewish avatar Aug 13 '17 03:08 breezewish

EDIT_RECORD_VISIBILITY(_SELF) should be a permission since the domain owner may want to set some record's source code to public for others to refer to, for example, after a contest.

inference: records should be assigned a domain? domain-scoped records have many advantages, for example, allowing domain owner to view all records.

breezewish avatar Aug 13 '17 03:08 breezewish

According to our design before, records are global. ^_^ T_T

@iceb0y

twd2 avatar Aug 14 '17 00:08 twd2

@iceb0y ptal

twd2 avatar Aug 15 '17 09:08 twd2

Looks like this change makes the visibility mutable (can be changed after a record is created) and doesn't provide an option to set this on submission time. I think we should first allow user to set this on submission time but disallow user to change this once record is created.

iceboy233 avatar Aug 22 '17 21:08 iceboy233

@iceb0y I think providing an extra option for overriding visibility might be not helpful and is a bit confusion for most of the users. It is a special use case so that it is not provided in the submission page. However users are more likely to change the visibility after submission though, because of knowing whether the submission is Accepted or not.

We could restrict the mutation for submissions older than a specific time (i.e. one month) to prevent history db records being modified. This restriction still meet demands for new submissions and it only affects users who wish to change the visibility for history submissions.

breezewish avatar Aug 23 '17 02:08 breezewish