-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#10915] Break course CRUD permission into edit, delete and restore permissions #11029
[#10915] Break course CRUD permission into edit, delete and restore permissions #11029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite a massive PR, only went through half the files so far hang on for the rest. Preliminary comment below
src/main/java/teammates/common/datatransfer/InstructorPrivileges.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me! We'll give it a few weeks to see if anyone else has the bandwidth for a second review. Actually, now that I think about it, I'm not really sure how these changes will affect instructors already present in the system. @wkurniawan07 @xpdavid any idea whether we might need a data migration for changes to instructor privileges?
Note that this is not a backwards compatible change. As of now the privileges are just serialised and stored as a JSON string. We have instructors with permission I am guessing our two options are:
Also, I am wondering if there is a need for the above change. Yes, fine-grained control is nice to have for courses but the same can be said for sessions/instructors/students etc. |
Yes, the original issue is an epic targeted at all those permissions as well. This PR is "part of", tacking only the portion for courses.
I suspected as much, thanks for confirming. @daongochieu2810 if you'd rather not have to account for legacy data, we can put this PR on hold until other portions of the epic are resolved. Following which we'll need a data migration script. Alternatively I could set up a feature branch actually. Regardless, you should be able to claim this PR for 3281 credit since it's already approved. Let me know whether you're able to account for legacy permissions in this PR, and I'll think about where to go from there. |
I think having a script to migrate legacy data is better since we dont need to have both |
@madanalogy I dont think we should delay this until other portions of the PR are done, as there will be a lot of merge conflicts. It is probably better if we maintain a script to migrate legacy data and update it as other portions of the PR are added |
Merge conflicts are the least of our concerns. Data migration needs to be done in phases. You need new features to be compatible with old data until such a time as a data migration script can be run. Even if you have the script ready, you cannot be certain that it will 100% work the first time you run it on production. This PR will be left on hold until such a time as other aspects are tackled and/or the changes are engineered to be backwards compatible. |
oh I see, then we should leave this on hold for now |
Closing for now until issue validity is discussed |
Part of #10915
Outline of Solution
Restore
,Edit
andDelete
buttons based on specific permissionsUpdateCourseAction
,BinCourseAction
andRestoreCourseAction