jingo icon indicating copy to clipboard operation
jingo copied to clipboard

Add ability limit write access to a subset of users

Open ScreamingHawk opened this issue 8 years ago • 2 comments

This wiki has been perfect for my use case sans the ability to supply a list of moderators who are the only people able to edit the wiki pages. So I added it.

This pull requests adds another configuration parameter authorization.moderatorsFile which takes a path to a YAML file. The YAML file can contain a list of usernames and/or emails of moderators. When this configuration parameter is supplied, users can only edit the wiki if they are on this list.

Example moderators file:

usernames:
  - 'developer'
  - 'moderator'
emails:
  - 'jingouser'

Related to #67. I agree with the "could blow out of scope" comment, so this implementation is an all or nothing solution when used.

This is an update to my previous pull request #205 using a branch so I can develop other enhancements without affecting this isolated pull request.

ScreamingHawk avatar May 16 '17 22:05 ScreamingHawk

Hi,

this is very interesting indeed. I just need to think for a moment about it before merging.

Thanks :)

claudioc avatar May 17 '17 20:05 claudioc

Small addition for users using LDAP that allows moderators to be configured via LDAP roles.

This change does not require my other pull request for LDAP and works with or without it, and is ignore for users not using LDAP.

Updated README with example YAML file.

ScreamingHawk avatar May 18 '17 20:05 ScreamingHawk