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

Use canComment for discussion reply permissions #8458

Closed
hypeJunction opened this issue Jun 11, 2015 · 3 comments
Closed

Use canComment for discussion reply permissions #8458

hypeJunction opened this issue Jun 11, 2015 · 3 comments

Comments

@hypeJunction
Copy link
Contributor

I have encountered a problem after filtering permissions to only allow group admins to create discussion topics, other users were not able to post replies.

This line here: https://github.com/Elgg/Elgg/blob/1.x/mod/groups/lib/discussion.php#L234 should perhaps be checking either canComment() or canWriteToContainer() on the topic, as ability to create new discussion topics is different from posting repies. Not sure if there are places where this needs to be changed.

@mrclay
Copy link
Member

mrclay commented Jun 12, 2015

canComment() sounds appropriate.

@hypeJunction
Copy link
Contributor Author

@juho-jaakkola Is this still an issue/

@juho-jaakkola
Copy link
Member

Yes. The current code is just checking if user is allowed to write to the group, but not if user is allowed to post a reply to the discussion: https://github.com/Elgg/Elgg/blob/2.0/mod/discussions/views/default/resources/discussion/view.php#L41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants