beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
50 stars 47 forks source link

Blog Helper + Permission improvements + Toggle contributor icon #361

Closed jauggy closed 1 month ago

jauggy commented 1 month ago

Improvements

  1. Contributors can now toggle whether or not they want to show their contributor icon in game. The checkbox is accessible on Contributor page and saves immediately on change.
  2. Contributor will now inherit permissions from Tester and Tester will no longer inherit permission from Contributor. Previously Tester would inherit permissions from Contributor, making the Tester potentially more powerful which doesn't make sense.
  3. Added a Blog helper role to coincide with this discord post: https://discord.com/channels/549281623154229250/1243869733988864042/1243869733988864042 The name could be changed to something else but it was called "Blog helper" in the discord post.
  4. Posting to blog now requires "Blog helper" permission. Contributors will inherit this permission. Since Tester no longer inherits from Contributor, a Tester can no longer post to blog.

Other Thoughts

The UI for toggling rank icon is very bare bones (there's no submit button - you just have to toggle it). I am not wanting to do more in this ticket but could be improved in the future.

Test Steps

Testing contributor rank toggle

Login as a user with Contributor role. Go to my account > Contributor. Tick the checkbox to disable showing rank icon. It will auto save on toggle. Now login to Chobby. Your rank icon will be like a regular user.

Testing Blog helper role

Give someone Blog helper role (remove Contributor role if needed). They should be able to create a blog post. Access via Blog > Blog Admin

Testing Tester role reduced permissions

Remove Blog helper role and give that user Tester role. Try relogin and on the blog page they shouldn't have permission to create a blog post. They still might see a preferences button but this button was already exposed to regular users.

jauggy commented 1 month ago

Was able to create a blog post using Blog helper role in integration server

1

jauggy commented 1 month ago

Now tested with Tester role I cannot see the Blog Admin button. I can see the preferences button but this was already exposed to regular users as evidenced here https://ptb.discord.com/channels/549281623154229250/549281623577722899/1261663425273139291

1