Feature summary (what you would like to be able to do and where):
I would like to restrict the extension to certain namespaces with a config variable $wgLockAuthorIncludedNamespaces.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
- I use a multi-tenancy setup and therefore when installing the extension:
- I would need to go through every customer's configuration file and add all publicly accessible custom namespaces to $wgLockAuthorExcludedNamespaces
- and whenever a customer requests a feature that requires a new namespace, I need to remember to add it to the $wgLockAuthorExcludedNamespaces
Benefits
When I want this extension to work for certain namespaces only (imagine e.g., Draft or Proposal) I can configure the extension for the customer that needs it and don't have to worry about the others.
I am willing to offer a merge request. My proposal would be to introduce another config variable wgLockAuthorNamespaceStrategy which defaults to e.g., exclude to maintain backwards compatibility. When set to e.g., include, $wgLockAuthorIncludedNamespaces will be used instead of $wgLockAuthorExcludedNamespaces to determine the course of action. I think the code will be more explicit and readable when a third config variable is used. Alternatively, a Boolean could be used: wgLockAuthorUseIncludedNamespaces which defaults to false.
Please let me know if you are interested.