[wp-trac] [WordPress Trac] #42686: Default selected changeset status should not be publish when current user does not have publish capability

WordPress Trac noreply at wordpress.org
Fri Nov 24 08:20:31 UTC 2017


#42686: Default selected changeset status should not be publish when current user
does not have publish capability
--------------------------+-----------------------------
 Reporter:  sayedwp       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.9
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 The default state of `wp.customize.state( 'selectedChangesetStatus' )` is
 set to `publish` even when the user does not have the publish capability.
 And its value is changed to `draft` if
 `wp.customize.settings.changeset.currentUserCanPublish` is `false` and the
 state changes.

 This would work fine if there is no extra status added by a plugin.
 However if a plugin tries to add status like `pending` and user clicks on
 it, it would create issues because the `selectedChangesetStatus` is forced
 to stay `draft`. See issue https://github.com/xwp/wp-customize-
 snapshots/issues/167

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42686>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list