We recently added support for neighborhood levels: 'silver', 'gold', 'platinum', None. Features are enabled based on those settings. We should still store the neighborhood level as a name (could be useful for reporting), but refactor the level checks to be feature checks so we can control them with more granularity. There is also an 'allow_private' flag that we should move into the features. Here's what I think a new field could look like:
features: { private_projects: true; max_projects: 500; css: 'custom'; // options: 'none', 'picker', 'custom' google_analytics: true; }
Paster commands are used to change settings and need to be updated too:
set-neighborhood-level = allura.command:SetNeighborhoodLevelCommand set-neighborhood-private = allura.command:SetNeighborhoodPrivateCommand
On allura js/4056. To test, change the neighborhood features using the command like:
Make sure that that changes you make are reflected in the UI. Max projects will prevent you from registering more projects than the number you set, private projects can't be created if they're set to false, and depending on the css setting you'll see a free-form css box, css property pickers, or no css option on the neighborhood admin page.
I ran
Then clicked the Add Project button and submitted the form with the Private Project checkbox checked. Got a 500, with this in the log:
That was mostly my fault when QAing the original private projects flag - I didn't ensure that forge-classic's copy of the reg form was updated. I have updated it now in forge-classic:db/4056 using the new field.
Merged forge and forge-classic to dev.