Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Restrict pm ability #203

Closed dappercrow closed 3 years ago

dappercrow commented 4 years ago

Tests

    • [x] Log in as nonprivileged user under level 3
        • [x] Visit nonprivileged user profile and confirm there is no option to PM them
        • [x] Visit an administrator user profile and confirm there is an option to PM them
    • [x] As nonprivileged user above level 3, confirm:
        • [x] I can PM other users
        • [x] I can PM administrators
    • [x] As admin user, visit nonprivileged user profile and admin profiles, confirm:
        • [x] I can PM a nonprivileged user
        • [x] I can PM other admins

Admin users should be able to receive PMs from and send PMs to any user.

dappercrow commented 4 years ago

Currently, the private user PM level restriction works, but the admin override doesn't (i.e. users can only PM admins if the user is above the set level).

happy-river commented 4 years ago

Can you add your new options to example.config.yaml? It's what serves as our configuration documentation.

dappercrow commented 4 years ago

@Polsaker I had one of my team members request that sub mods always be able to PM users -- is this something you want for upstream or should I reserve that for our fork?

Polsaker commented 4 years ago

@Polsaker I had one of my team members request that sub mods always be able to PM users -- is this something you want for upstream or should I reserve that for our fork?

It's OK for me, but there should be a config option to toggle that

dappercrow commented 3 years ago

@Polsaker Thanks for the help -- it's been a rough couple of weeks for health. 🙁

Polsaker commented 3 years ago

PS: Take it easy, health comes first!

dappercrow commented 3 years ago

@Polsaker thanks! That &/and was exactly the problem.

Right now, the patch works as intended, but an unintended side effect is that the low-level user can't send messages to itself, but a user above the level threshold can. Should users be able to PM themselves or not?

Polsaker commented 3 years ago

Yeah we should probably disallow that

dappercrow commented 3 years ago

@Polsaker OK, looks like the is not vs != distinction caught me up there. Fixed.