Page MenuHomePhabricator

Coordinators should be able to assign new access codes
Closed, ResolvedPublic

Description

A coordinator attempted to assign a new access code to a user today but ran into a problem which generated a server error. They set the application back to Approved, navigated to the 'Send data' view, and selected a new access code. The user ultimately received their code, but it was disconnected from their authorization and a server error was displayed due to the system attempting to create a duplicated authorization.

This requires a little thought as to the best approach - the method used here isn't ideal because we probably shouldn't be un-finalizing applications, but we may not have a better place to add functionality to remove and assign codes. A new view for access code management might be the most comprehensive solution.

Event Timeline

This is a probable temporary solution for this: https://github.com/WikipediaLibrary/TWLight/pull/894. @Samwalton9 @jsn.sherman let me know what you think about this solution.

This seems a reasonable solution to me :)

I can't think of any time we'd care about keeping the old code, we're usually reassigning because the old code is no longer useful.

For my part, the code looks like a fine approach.

Merged. We should backlog a task for tests.