Skip to content

Conversation

@Axxiar
Copy link
Contributor

@Axxiar Axxiar commented Nov 27, 2025

Summary by CodeRabbit

  • New Features

    • Added a configurable "campaigns" feature flag across the UI (settings, sidebar visibility, and in-memory flags).
  • Enhancements

    • Settings UI now only shows feature-flag options present for the current page.
    • Activity logs include actor, action and content-type details; sensitive data (passwords) are masked.
  • Refactor

    • Backend serializer handling improved for more flexible feature-flag serialization and extensibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Adds a new "campaigns" feature flag across frontend and backend: UI form rendering, feature-flag schema and loader, sidebar visibility mapping, serializer exposure via GlobalSettings, and a serializer-factory/resolution change in the global settings view.

Changes

Cohort / File(s) Summary
Frontend: form & flags
frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte, frontend/src/lib/feature-flags.ts, frontend/src/lib/utils/schemas.ts
Adds the campaigns flag to the feature-flag loader and schema; imports page state in the Svelte form and filters featureFlagFields at runtime to render only fields present in page.data.featureFlagSettings.
Frontend: sidebar integration
frontend/src/lib/utils/sidebar-config.ts
Adds campaigns: boolean to SidebarBackendKeys and SidebarFrontendKeys; maps campaigns in getSidebarVisibleItems using featureFlags?.campaigns ?? false.
Backend: global settings view / serializer factory
backend/global_settings/views.py
Introduces GlobalSettingsSerializerFactory (module-priority resolver) and a serializers_module attribute; FeatureFlagsViewSet now resolves serializer classes with get_serializer_class, logs resolution, and instantiates serializers for retrieve/update actions.
Enterprise backend: serializers
enterprise/backend/enterprise_core/serializers.py
Adds FeatureFlagsSerializer backed by GlobalSettings with explicit boolean fields including campaigns; extends LogEntrySerializer with actor, action, content_type, folder and masks password changes for user-related logs.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Client
    participant FeatureFlagsViewSet
    participant GlobalSettingsSerializerFactory as Factory
    participant FeatureFlagsSerializer as Serializer
    participant GlobalSettingsDB as GlobalSettings

    Client->>FeatureFlagsViewSet: GET /global-settings/feature-flags
    FeatureFlagsViewSet->>Factory: get_serializer("<BaseName>", action)
    Factory-->>FeatureFlagsViewSet: FeatureFlagsSerializer class
    FeatureFlagsViewSet->>Serializer: instantiate(serializer_class, instance)
    Serializer->>GlobalSettings: read value (e.g., value.campaigns)
    GlobalSettings-->>Serializer: feature flags payload
    Serializer-->>FeatureFlagsViewSet: serialized data
    FeatureFlagsViewSet-->>Client: 200 OK + serialized feature flags
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Focus areas:
    • GlobalSettingsSerializerFactory — module ordering, class name construction, missing-serializer handling.
    • FeatureFlagsViewSet.get_serializer_class — DRF expectations across actions and logging side-effects.
    • FeatureFlagsSerializer field source="value.<key>" mappings and read_only behavior.
    • LogEntrySerializer.to_representation password-masking logic for user content_type.
    • Svelte form runtime filter — behavior when page.data.featureFlagSettings is undefined.

Suggested reviewers

  • eric-intuitem

Poem

🐰
A tiny flag named "campaigns" leaps with cheer,
From form to factory it draws near.
Serializers whisper, the sidebar gleams,
Bits hop together in code-made dreams.
🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a new feature flag named 'campaigns' across frontend and backend components.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CA-1315-add-feature-flag-for-campaigns

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a24e5dc and 5bf6982.

📒 Files selected for processing (1)
  • frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: startup-functional-test (3.12)
  • GitHub Check: enterprise-startup-functional-test (3.12)
  • GitHub Check: enterprise-startup-docker-compose-test
  • GitHub Check: startup-docker-compose-test
  • GitHub Check: build (3.12)
  • GitHub Check: test (3.12)
  • GitHub Check: build_enterprise_frontend
  • GitHub Check: build_community_frontend
  • GitHub Check: Analyze (python)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Axxiar Axxiar marked this pull request as ready for review November 27, 2025 15:26
Copy link
Collaborator

@nas-tabchiche nas-tabchiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Campaigns are a pro-only feature, the feature flag must not be visible in community

@Axxiar Axxiar added the pro label Nov 28, 2025
@Axxiar Axxiar marked this pull request as draft November 28, 2025 13:22
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
backend/global_settings/views.py (2)

7-8: Simplify GlobalSettingsSerializerFactory and avoid unused parameters

GlobalSettingsSerializerFactory mostly duplicates SerializerFactory:

  • __init__ is identical to the base implementation; you can simply delegate to super().__init__(*modules) and avoid repeating the logic/comment.
  • get_serializer(self, base_name: str, action: str = "default") ignores the action argument entirely, which makes the signature misleading.

You could reduce surface area and future confusion with something like:

class GlobalSettingsSerializerFactory(SerializerFactory):
    def __init__(self, *modules: str):
        super().__init__(*modules)

    def get_serializer(self, base_name: str) -> type:
        return self._get_serializer_class(f"{base_name}Serializer")

or even drop this subclass and use SerializerFactory + a small helper where you need it.

Also applies to: 18-21, 23-35


64-80: Use DRF’s get_serializer/context and guard against invalid module defaults

A few points around FeatureFlagsViewSet:

  • In retrieve/update you’re doing self.get_serializer_class()(instance, ...) directly. This bypasses DRF’s get_serializer, so:

    • No context (e.g. {"request": request, "view": self}) is passed.
    • You also skip perform_update() in update.

    It’s safer and more idiomatic to keep DRF’s flow and only customize which class is used. For example:

    def get_serializer_class(self, **kwargs):
        factory = GlobalSettingsSerializerFactory(
            self.serializers_module,
            settings.MODULE_PATHS.get("serializers"),
        )
        return factory.get_serializer("FeatureFlags")
    
    def retrieve(self, request, *args, **kwargs):
        instance = self.get_object()
        serializer = self.get_serializer(instance)
        return Response(serializer.data)
    
    def update(self, request, *args, **kwargs):
        instance = self.get_object()
        serializer = self.get_serializer(instance, data=request.data)
        serializer.is_valid(raise_exception=True)
        self.perform_update(serializer)
        return Response(serializer.data)
  • settings.MODULE_PATHS.get("serializers", []) uses [] as a default, which is not a valid module path. If the key were ever missing, GlobalSettingsSerializerFactory would receive a non‑string module and importlib.import_module would fail. Either ensure "serializers" is always defined in MODULE_PATHS or filter out falsy/non‑string values before passing them into the factory.

  • Since your GlobalSettingsSerializerFactory.get_serializer ignores its action argument, passing kwargs.get("action", "default") is unnecessary noise; consider dropping that argument for clarity.

These changes would keep the dynamic enterprise/community resolution while staying aligned with DRF conventions and making the behavior more robust.

Also applies to: 84-85, 89-90

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 054c9f7 and f2bb934.

📒 Files selected for processing (3)
  • backend/global_settings/views.py (3 hunks)
  • enterprise/backend/enterprise_core/serializers.py (2 hunks)
  • frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte
🧰 Additional context used
🧬 Code graph analysis (1)
backend/global_settings/views.py (3)
backend/core/serializers.py (9)
  • SerializerFactory (30-62)
  • get_serializer (41-49)
  • _get_serializer_class (51-62)
  • update (75-83)
  • update (306-315)
  • update (455-467)
  • update (836-852)
  • update (1254-1268)
  • update (1505-1512)
backend/global_settings/models.py (1)
  • GlobalSettings (7-29)
backend/core/views.py (10)
  • get_serializer_class (498-513)
  • get_serializer_class (8545-8546)
  • get (669-676)
  • get (6247-6248)
  • retrieve (838-839)
  • retrieve (5106-5107)
  • update (578-606)
  • update (4679-4691)
  • update (4939-4952)
  • update (8440-8443)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (python)
🔇 Additional comments (2)
enterprise/backend/enterprise_core/serializers.py (2)

10-14: Enterprise feature-flag imports are wired correctly

Importing GlobalSettings and aliasing the community FeatureFlagsSerializer for extension in the enterprise layer looks consistent with the new usage below.


137-177: I'll help you verify the concerns raised in this review comment. Let me start by examining the codebase to understand the context better.
<function_calls>


#!/bin/bash

First, let's find the file and examine the serializer class

find . -name "serializers.py" -path "/enterprise_core/" | head -5


</function_calls>


#!/bin/bash

Get line count and view the relevant section of the file

wc -l enterprise/backend/enterprise_core/serializers.py


</function_calls>
<function_calls>


#!/bin/bash

View the FeatureFlagsSerializer and CommunityFeatureFlagSerializer

sed -n '100,200p' enterprise/backend/enterprise_core/serializers.py


</function_calls>
<function_calls>


#!/bin/bash

Find CommunityFeatureFlagSerializer definition

rg -n "class CommunityFeatureFlagSerializer" enterprise/backend/


</function_calls>

Let me search for the parent serializer and understand the full context:
<function_calls>


#!/bin/bash

Search for CommunityFeatureFlagSerializer in the entire repo

rg -n "CommunityFeatureFlagSerializer" --type py -A 20 | head -80


</function_calls>

Now let me check the GlobalSettings model to understand if "name" is actually a field:
<function_calls>


#!/bin/bash

Find GlobalSettings model definition

rg -n "class GlobalSettings" --type py -A 30 | head -60


</function_calls>

Let me also check how DRF handles the read_only_fields configuration:
<function_calls>


#!/bin/bash

Search for any tests or usages of FeatureFlagsSerializer

rg -n "FeatureFlagsSerializer" --type py -B 2 -A 5


</function_calls>

Let me get a clearer view of the complete serializers file around this area:
<function_calls>


#!/bin/bash

View lines 1-50 to see imports and parent class

sed -n '1,50p' enterprise/backend/enterprise_core/serializers.py


</function_calls>

<function_calls>


#!/bin/bash

View more of the file to find CommunityFeatureFlagSerializer

sed -n '50,140p' enterprise/backend/enterprise_core/serializers.py


</function_calls>

Now let me check what fields are actually on the GlobalSettings model:
<function_calls>


#!/bin/bash

Find GlobalSettings model

find . -name "models.py" -path "/enterprise_core/" | xargs grep -l "GlobalSettings"


</function_calls>

<function_calls>


#!/bin/bash

View the GlobalSettings model

rg -n "class GlobalSettings" --type py -A 50 | head -100


</function_calls>

Let me check if there are any actual import-time errors or test failures related to this:
<function_calls>


#!/bin/bash

Search for test files that might test this serializer

find . -path "/test" -name "*.py" -type f | xargs grep -l "FeatureFlagsSerializer|GlobalSettings" 2>/dev/null | head -5


</function_calls>

Let me view the complete serializer class definition more carefully:
<function_calls>


#!/bin/bash

Get the full context around lines 137-177

sed -n '130,185p' enterprise/backend/enterprise_core/serializers.py


</function_calls>

Now let me verify the exact field definitions on GlobalSettings:
<function_calls>


#!/bin/bash

Search for GlobalSettings definition more thoroughly

find . -type f -name "*.py" | xargs grep -n "class GlobalSettings" 2>/dev/null


</function_calls>

<function_calls>


#!/bin/bash

View the models.py file containing GlobalSettings

rg -n "class GlobalSettings" -A 60 --type py | head -100


</function_calls>

Now let me check the CommunityFeatureFlagSerializer to understand the parent class:
<function_calls>


#!/bin/bash

Get full CommunityFeatureFlagSerializer

rg -n "class CommunityFeatureFlagSerializer" -A 80 --type py


</function_calls>

Let me search more specifically in the enterprise_core directory:
<function_calls>


#!/bin/bash

List all python files in enterprise_core

find enterprise/backend/enterprise_core -name "*.py" -type f


</function_calls>

<function_calls>


#!/bin/bash

View models.py to find GlobalSettings

wc -l enterprise/backend/enterprise_core/models.py
sed -n '1,50p' enterprise/backend/enterprise_core/models.py


</function_calls>

<function_calls>


#!/bin/bash

Search for GlobalSettings in models

grep -n "class GlobalSettings" enterprise/backend/enterprise_core/models.py


</function_calls>

<function_calls>


#!/bin/bash

Get GlobalSettings class definition

sed -n '1,100p' enterprise/backend/enterprise_core/models.py | grep -A 50 "class GlobalSettings"


</function_calls>

<function_calls>


#!/bin/bash

Let's get the full serializers file to understand the complete context

head -300 enterprise/backend/enterprise_core/serializers.py | tail -200


</function_calls>

Let me try a different approach to see the full serializer file:
<function_calls>


#!/bin/bash

Check file size and view strategic sections

wc -l enterprise/backend/enterprise_core/serializers.py
echo "=== Lines 1-60 ==="
head -60 enterprise/backend/enterprise_core/serializers.py


</function_calls>

<function_calls>


#!/bin/bash

Continue viewing

echo "=== Lines 60-140 ==="
sed -n '60,140p' enterprise/backend/enterprise_core/serializers.py


</function_calls>

<function_calls>


#!/bin/bash

View the specific section mentioned in the review

echo "=== Lines 137-185 ==="
sed -n '137,185p' enterprise/backend/enterprise_core/serializers.py


</function_calls>

Now let me check the GlobalSettings model:
<function_calls>


#!/bin/bash

Get info about GlobalSettings

echo "=== Searching for GlobalSettings ==="
grep -n "class GlobalSettings|name.*=" enterprise/backend/enterprise_core/models.py | head -20


</function_calls>

<function_calls>


#!/bin/bash

View the GlobalSettings model definition with more context

wc -l enterprise/backend/enterprise_core/models.py
sed -n '1,150p' enterprise/backend/enterprise_core/models.py


</function_calls>

Let me also check if there are any issues or tests currently failing:
<function_calls>


#!/bin/bash

Check for imports related to GlobalSettings and FeatureFlagsSerializer

python3 << 'EOF'

Let's check if we can understand the structure by examining the file directly

with open('enterprise/backend/enterprise_core/serializers.py', 'r') as f:
content = f.read()

Find CommunityFeatureFlagSerializer

import re
community_match = re.search(r'class CommunityFeatureFlagSerializer.*?(?=\nclass |\Z)', content, re.DOTALL)
if community_match:
print("=== CommunityFeatureFlagSerializer ===")
print(community_match.group(0)[:1500])

print("\n=== Looking for 'name' field references ===")
for i, line in enumerate(content.split('\n')[130:190], start=131):
print(f"{i}: {line}")
EOF


</function_calls>

<function_calls>


#!/bin/bash

Let me read the entire serializers file to understand the class hierarchy

cat enterprise/backend/enterprise_core/serializers.py


</function_calls>

Perfect! Now I have all the context. Let me verify the GlobalSettings model:
<function_calls>


#!/bin/bash

Check GlobalSettings model

cat enterprise/backend/enterprise_core/models.py | head -200


</function_calls>

Let me verify if this configuration actually causes errors:
<function_calls>


#!/bin/bash

Search for test files that import this serializer

find . -path "/test" -name "*.py" -type f | xargs grep -l "FeatureFlagsSerializer" 2>/dev/null


</function_calls>

<function_calls>


#!/bin/bash

Check if there are any validation or assertion errors in DRF when using this config

Let's search for related issues or documentation

rg -n "read_only_fields" enterprise/backend/enterprise_core/serializers.py


</function_calls>

Let me check if there are other serializers with similar patterns to understand the intent:
<function_calls>


#!/bin/bash

Search for similar patterns in other serializers

rg -B 5 "read_only_fields.=.[" enterprise/backend/enterprise_core/serializers.py


</function_calls>

Let me verify DRF's behavior with a Python check:
<function_calls>


#!/bin/bash

Check Django REST Framework documentation/behavior on this

python3 << 'EOF'

DRF will NOT raise an error immediately, but it WILL cause issues

Let's document what happens:

print("=== DRF ModelSerializer read_only_fields behavior ===")
print()
print("When a field is in read_only_fields but NOT in fields:")
print("- DRF will attempt to create the field automatically")
print("- If the model field exists, DRF will auto-generate it as read-only")
print("- However, this is undocumented behavior and can lead to issues")
print()
print("The proper pattern is:")
print("1. Include 'name' in fields if you want it read-only")
print("2. OR remove 'name' from read_only_fields if you don't want to expose it")
print()
print("Current code in FeatureFlagsSerializer:")
print("- Excludes 'name' from fields (unlike parent CommunityFeatureFlagSerializer)")
print("- Includes 'name' in read_only_fields (same as parent)")
print("- This is inconsistent and will cause DRF to handle it unpredictably")
EOF


</function_calls>

Let me check the actual behavior by looking for usages:
<function_calls>


#!/bin/bash

Search for any places where FeatureFlagsSerializer is instantiated/used

rg "FeatureFlagsSerializer" --type py -B 3 -A 3


</function_calls>

<function_calls>


#!/bin/bash

Check if there are tests for this serializer

find . -path "test" -name "*.py" | xargs grep -l "FeatureFlagsSerializer" 2>/dev/null


</function_calls>

<function_calls>


#!/bin/bash

Let's check what the actual parent CommunityFeatureFlagSerializer fields are

python3 << 'EOF'

From the serializers.py we saw, let's extract the exact fields

import re

with open('enterprise/backend/enterprise_core/serializers.py', 'r') as f:
content = f.read()

Find CommunityFeatureFlagSerializer class

community_pattern = r'class CommunityFeatureFlagSerializer.?class\s+\w+Serializer'
match = re.search(community_pattern, content, re.DOTALL)
if match:
community_class = match.group(0)
# Extract fields from Meta
fields_match = re.search(r'fields\s
=\s*[(.*?)]', community_class, re.DOTALL)
if fields_match:
print("=== CommunityFeatureFlagSerializer.Meta.fields ===")
fields_str = fields_match.group(1)
fields = [f.strip().strip('"').strip("'") for f in fields_str.split(',') if f.strip()]
for field in fields:
print(f" - {field}")
print(f"Total: {len(fields)} fields")
print(f"Contains 'name': {'name' in fields}")

print("\n=== FeatureFlagsSerializer.Meta.fields ===")
feature_pattern = r'class FeatureFlagsSerializer.?read_only_fields'
match = re.search(feature_pattern, content, re.DOTALL)
if match:
feature_class = match.group(0)
fields_match = re.search(r'fields\s
=\s*[(.*?)]', feature_class, re.DOTALL)
if fields_match:
fields_str = fields_match.group(1)
fields = [f.strip().strip('"').strip("'") for f in fields_str.split(',') if f.strip()]
for field in fields:
print(f" - {field}")
print(f"Total: {len(fields)} fields")
print(f"Contains 'name': {'name' in fields}")
EOF


</function_calls>

Excellent! Now I have enough information. Let me verify one more thing about the campaigns default:
<function_calls>


#!/bin/bash

Check if campaigns field defaults are used anywhere or documented

rg "campaigns" enterprise/backend/enterprise_core/ -B 2 -A 2


</function_calls>

Based on my thorough verification of the codebase, I can now provide the final rewritten review comment:

Fix Meta.fields / read_only_fields mismatch and verify campaigns default

Two issues found:

  • read_only_fields = ["name"] but "name" is not in fields. The parent CommunityFeatureFlagSerializer includes "name" in its fields, but this subclass excludes it. For a ModelSerializer, DRF expects any field in read_only_fields to also be in fields. Fix by adding "name" to fields:

         fields = [
  •      "name",
         "xrays",
         "incidents",
         "tasks",
         "risk_acceptances",
         "exceptions",
         "follow_up",
         "ebiosrm",
         "scoring_assistant",
         "vulnerabilities",
         "compliance",
         "tprm",
         "privacy",
         "experimental",
         "inherent_risk",
         "organisation_objectives",
         "organisation_issues",
         "quantitative_risk_studies",
         "terminologies",
         "bia",
         "project_management",
         "contracts",
         "reports",
         "validation_flows",
         "campaigns",
     ]
    
    
    
  • campaigns has default=True, which means the feature is enabled by default when the key is absent from value. Confirm this rollout strategy is intentional.

Additionally, to avoid field duplication with CommunityFeatureFlagSerializer, consider subclassing its Meta and appending only "campaigns" to the parent fields list.

Likely an incorrect or invalid review comment.

@Axxiar Axxiar marked this pull request as ready for review December 1, 2025 10:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
backend/global_settings/views.py (1)

23-34: Consider calling super().__init__() and removing the unused action parameter.

  1. The __init__ method duplicates the parent class's logic. Since GlobalSettingsSerializerFactory extends SerializerFactory, you can delegate to the parent constructor.

  2. The action parameter in get_serializer is never used, which is misleading. If a single serializer is intentionally used for all actions, remove the parameter to clarify intent.

 class GlobalSettingsSerializerFactory(SerializerFactory):
     """Factory to get a serializer class from a list of modules.
     Attributes:
     modules (list): List of module names to search for the serializer.
     """

-    def __init__(self, *modules: str):
-        # Reverse to prioritize later modules
-        self.modules = list(reversed(modules))
+    def __init__(self, *modules: str):
+        super().__init__(*modules)

-    def get_serializer(self, base_name: str, action: str = "default"):
+    def get_serializer(self, base_name: str):
         return self._get_serializer_class(f"{base_name}Serializer")
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2bb934 and a24e5dc.

📒 Files selected for processing (3)
  • backend/global_settings/views.py (3 hunks)
  • frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte (3 hunks)
  • frontend/src/lib/utils/schemas.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/lib/utils/schemas.ts
🧰 Additional context used
🧬 Code graph analysis (1)
backend/global_settings/views.py (2)
backend/core/serializers.py (9)
  • SerializerFactory (30-62)
  • get_serializer (41-49)
  • _get_serializer_class (51-62)
  • update (75-83)
  • update (306-315)
  • update (455-467)
  • update (836-852)
  • update (1254-1268)
  • update (1505-1512)
backend/core/views.py (10)
  • get_serializer_class (553-568)
  • get_serializer_class (8631-8632)
  • get (761-768)
  • get (6333-6334)
  • retrieve (930-931)
  • retrieve (5192-5193)
  • update (661-693)
  • update (4764-4776)
  • update (5025-5038)
  • update (8526-8529)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (3.12)
  • GitHub Check: build_enterprise_frontend
  • GitHub Check: build_community_frontend
  • GitHub Check: startup-functional-test (3.12)
  • GitHub Check: enterprise-startup-functional-test (3.12)
  • GitHub Check: enterprise-startup-docker-compose-test
  • GitHub Check: startup-docker-compose-test
  • GitHub Check: test (3.12)
🔇 Additional comments (2)
backend/global_settings/views.py (1)

7-20: Imports look appropriate for the new functionality.

The imports for SerializerFactory, Django settings, and structlog are correctly added to support the new dynamic serializer resolution pattern.

frontend/src/lib/components/Forms/ModelForm/FeatureFlagsSettingForm.svelte (1)

26-26: New campaigns flag entry is consistent

The new { field: 'campaigns', label: m.campaigns() } entry matches the existing feature-flag pattern (string key + localized label) and integrates cleanly into the config array. As long as the campaigns flag is wired through the schema/backend (which the rest of the PR appears to cover), this looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants