After [#2264] is finished, need a script to repair any damage done in prod.
"""
For projects:
* Admin role.roles should contain Developer, and Developer only
* Developer role.roles should contain Member, and Member only
For project.users:
* user.project_role().roles, if it contains Admin, should not contain
Developer or Member
* user.project_role().roles, if it contains Developer, should not contain
Member
"""
forge:tv/2330
To test, log in to allura as an admin and go to /p/test/admin/groups. Delete admin1 from the Developer group. Add test-user to the Developer group and Member group.
A few things just happened:
Run the script in test-only mode and view the log:
You should see output describing repairs that need to be made to project and user roles. In this case, it should include something about resetting the Admin and Developer roles for the "test" project, and something about removing the Member role from admin1 and removing the Member role from test-user.
Run the script without the test flag:
You should see output describing repairs that were made. Now run the script one more time to make sure everything actually got fixed:
The only output should be something similar to the following:
Related
Tickets:
#2264Looks good.