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:
1. Subroles for the test project just got obliterated, due to a bug fixed in [#2264]. This means that the Admin role no longer contains Developer and Member, and the Developer role no longer contains Member, as they should.
2. admin1 has separate Admin and Member roles, but should actually only have Admin, since Admin should contain Member.
3. test-user has separate Developer and Member roles, but should actually only have Developer, since Developer should contain Member.
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.