Skip to content
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

fix a permission mismatch #2251

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

Alex-Jordan
Copy link
Contributor

It seems to me that the wrong permission is referenced here. The problem editor page has nothing to do with student data.

What I'm changing it to seems like the best option. In some cases, the problem editor page allows you to edit a problem set. Although, if you enter it directly then it would seem that ability to edit a problem set is irrelevant, and why not let someone code a new problem? But this change is at least a better option than what is in there now, I think.

I came upon this reviewing old issues, in particular #746. For that issue to make sense, my guess is that modify_problem_sets is what should be here too. Assuming we don't make something better now that the problem editor is more general purpose than it once was.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems right to me.

@drgrice1
Copy link
Member

Another possibility would be to use the modify_problem_template_files permission. That permission is currently not even used for anything.

@Alex-Jordan
Copy link
Contributor Author

It seemed like a few other places there is logic based on modify_problem_sets giving access to the editor, although I did not do a thorough investigation. Unless you think modify_problem_template_files would be better here, I propose leaving this PR the way it is. But also I was going to separately do a comprehensive refactoring of what grants access to the editor. Both to address #746 and also to make it make more sense now that the editor has more uses than it once did. I haven't thought it through yet but I think it would make this current PR moot.

@drgrice1
Copy link
Member

Another possibility is to use manage_course_files. Technically all files that can be edited are course files.

Also, this could depend on more than one permission.

In any case, this pull request is fine.

@pstaabp pstaabp merged commit 0a5046e into openwebwork:develop Nov 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants