uchicago-cs / chigame

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Add default forum permissions setting #412

Closed joshuamonroe closed 9 months ago

joshuamonroe commented 9 months ago

During testing I noticed that regular user accounts do not have permissions to view the forums.

This is the forum viewed as an admin. Thus far, most testing has been done from an admin account. Image

And this is the same forum viewed as a regular user. Image

A fix would be pretty easy, we would just need to set django-machina's default authenticated user permissions setting according to the defaults provided here. This would apply to all authenticated users across all forums that don't have more restrictive permissions.

MACHINA_DEFAULT_AUTHENTICATED_USER_FORUM_PERMISSIONS = [
    'can_see_forum',
    'can_read_forum',
    'can_start_new_topics',
    'can_reply_to_topics',
    'can_edit_own_posts',
    'can_post_without_approval',
    'can_create_polls',
    'can_vote_in_polls',
    'can_download_file',
]

Alternatively, we could consider setting permissions manually on a per forum basis, more info on what that would entail and a full list of possible permissions can also be found here.

joshuamonroe commented 9 months ago

I've added the the necessary permissions setting and submitted a pull request to merge it into dev

joshuamonroe commented 9 months ago

Closed after successfully merging and closing #414. Thanks to @bburgess19 for reviewing the PR.

majorsylvie commented 9 months ago

Issue Score: Excellent