Skip to content

Add license check for group wikis

Markus Koller requested to merge group-wikis-license-check into master

What does this MR do?

When we originally started working on this, it wasn't clear yet if it
would be a paid feature. Shortly afterwards we decided to put it into
EE Starter and moved the code into `ee/`, but forgot to add the license
checks.

- Rename feature flag to `group_wikis_feature_flag` to align with the
  feature name in the `License `model, which is plural as well.
  We have to use a different name for the FF because licensed features
  need to default to on.

- `EE::Group#wiki_access_level` is removed since this was only added
  to support the shared examples for wiki policies, which also expect
  the `private` access level to be supported. In practice we don't
  support this yet for group wikis, so now we just skip these specs
  instead.

- The license and feature flag checks are centralized in the group
  policy, so we only test these special cases there, and otherwise
  just call our new `stub_group_wikis` helper to test the general
  case of the feature not being available.

Ref: #13195 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Markus Koller

Merge request reports