GP_Translation::can_set_status() doesn't allow CLI imports to set status = current #644

Closed
ocean90 opened this Issue Jan 29, 2017 · 0 comments

Projects

None yet

1 participant

@ocean90
Member
ocean90 commented Jan 29, 2017

In 2.2.2 setting a status doesn't require any capabilities but in 2.3 (#538) we now have a can_set_status() method which checks if the current user can approve translations. This check fails when importing strings via CLI.

A side effect of this issue is that you might end with duplicate current entries because there is no capability check when the import creates the translation.

That's a back-compat issue and was noticed on translate.w.org. 🙁
To provide the same behaviour as before we could add a gp_pre_can_set_translation_status filter when WP-CLI is used.

@ocean90 ocean90 added the bug label Jan 29, 2017
@ocean90 ocean90 added this to the 2.3 milestone Jan 29, 2017
@ocean90 ocean90 self-assigned this Jan 29, 2017
@ocean90 ocean90 closed this in #645 Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment