framework icon indicating copy to clipboard operation
framework copied to clipboard

Permissions - Reply to discussion negates Start discussions

Open kulga opened this issue 10 years ago • 3 comments

using dev-master but also showed up on beta.5

If a user has permissions:

  • Allowed to Start Discussions
  • Not allowed Reply to Discussions

The user is unable to create a new discussion and when the user attempts to:

      "status": "401",
      "code": "permission_denied"

If the user has their permissions changed:

  • Allowed to Start Discussions
  • Allowed Reply to Discussions

They can create a new discussion

kulga avatar Apr 06 '16 17:04 kulga

Can anyone tell me understanding the method https://github.com/flarum/core/blob/master/src/Core/Access/Gate.php#L208

and

https://github.com/flarum/core/blob/master/src/Core/Access/Gate.php#L227

poush avatar Apr 29 '16 17:04 poush

Hmm, I'm torn on this one. After all, the "reply to discussion" permission basically means the user is allowed to make posts. The "start discussion" permission is a special case of that - it's for new topics only.

So, technically, one should need the permission

Isn't this a usability problem really? So that the "start discussion" permission should automatically activate the "reply to discussion" permission? Is there any valid use case where users would only be allowed to start discussions, but not to reply to them?

franzliedke avatar May 13 '16 14:05 franzliedke

Is there any valid use case where users would only be allowed to start discussions, but not to reply to them?

I think we can't rule that out. e.g. a "drop box" style forum, say where students submit their assignments by creating a new discussion, but then they're not allowed to comment on anything.

We should do our best to try and support this behaviour, it shouldn't be too hard.

tobyzerner avatar May 18 '16 01:05 tobyzerner