Skip to content

Add default retention policy - #623

Merged
Paul Lizer (paullizer) merged 5 commits into
Developmentfrom
add-default-retention-policy
Jan 22, 2026
Merged

Add default retention policy#623
Paul Lizer (paullizer) merged 5 commits into
Developmentfrom
add-default-retention-policy

Conversation

@paullizer

Copy link
Copy Markdown
Contributor
  • Retention Policy Defaults
    • Admin-configurable organization-wide default retention policies for conversations and documents across all workspace types.
    • Organization Defaults: Set default retention periods (1 day to 10 years, or "Don't delete") separately for personal, group, and public workspaces.
    • User Choice: Users see "Using organization default (X days)" option and can override with custom settings or revert to org default.
    • Conditional Display: Default retention settings only appear in Admin Settings when the corresponding workspace type is enabled.
    • Force Push Feature: Administrators can push organization defaults to all workspaces, overriding any custom retention policies users have set.
    • Settings Auto-Save: Force push automatically saves pending settings changes before executing to ensure current values are pushed.
    • Activity Logging: Force push actions are logged to activity_logs container for audit purposes with admin info, affected scopes, and results summary.
    • API Endpoints: New /api/retention-policy/defaults/<workspace_type> (GET) and /api/admin/retention-policy/force-push (POST) endpoints.
    • Files Modified: functions_settings.py, admin_settings.html, route_frontend_admin_settings.py, route_backend_retention_policy.py, functions_retention_policy.py, functions_activity_logging.py, profile.html, control_center.html, workspace-manager.js.
    • (Ref: Default retention settings, Force Push modal, activity logging, retention policy execution)

Comment threadapplication/single_app/route_backend_retention_policy.py
Comment threadapplication/single_app/route_backend_retention_policy.py
Comment threadapplication/single_app/route_backend_retention_policy.py
Comment threadapplication/single_app/route_backend_retention_policy.py Outdated
Bionic711
Bionic711 previously approved these changes Jan 22, 2026

@Bionic711Bionic711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nothing needed to stop the PR, but a couple notes to do in a future push.

@paullizer

Copy link
Copy Markdown
ContributorAuthor

Nothing needed to stop the PR, but a couple notes to do in a future push.

Updated log_event and dissemination of error directly to front end. Approve when you have time.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces admin-configurable organization-wide default retention policies for conversations and documents, allowing administrators to set defaults per workspace type that users can either accept or override. It also includes fixes for sovereign cloud authentication, user search UX improvements, private networking support, and Control Center application roles.

Changes:

  • Retention Policy Defaults: Adds organization-level default retention policies with admin force-push capability, new API endpoints, and conditional UI based on enabled workspace types
  • Bug Fixes: Fixes sovereign cloud cognitive services scope hardcoding and replaces browser alerts with toast notifications in user search
  • Infrastructure: Adds comprehensive private networking support via AZD/Bicep with VNet integration and private endpoints
  • Access Control: Introduces two new Control Center application roles for finer-grained permissions
  • Dependency Updates: Updates Werkzeug to 3.1.5 and aiohttp to 3.13.3

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
config.pyVersion updated to 0.236.011
functions_settings.pyAdded 6 new default retention policy settings for each workspace type
route_frontend_admin_settings.pyHandles saving of new default retention settings from admin form
route_backend_retention_policy.pyImplements GET defaults and POST force-push API endpoints with activity logging
functions_retention_policy.pyAdds resolve_retention_value() helper to handle 'default' value resolution
functions_activity_logging.pyImplements log_retention_policy_force_push() for audit trail
admin_settings.htmlAdds default retention UI with conditional visibility and force push modal
profile.htmlUpdates retention dropdowns with "Using organization default" option
control_center.htmlAdds retention policy settings for group and public workspaces with org defaults
workspace-manager.jsImplements public workspace retention settings loading and saving
requirements.txtUpdates Werkzeug (3.1.4→3.1.5) and aiohttp (3.12.15→3.13.3)
release_notes.mdDocuments all new features and bug fixes for v0.236.011
RETENTION_POLICY_DEFAULTS.mdComprehensive feature documentation with examples and configuration
PRIVATE_NETWORKING_SUPPORT.mdDocuments private networking deployment via AZD with architecture diagrams
CONTROL_CENTER_APPLICATION_ROLES.mdDocuments new application roles for Control Center access control
USER_AGREEMENT.mdUpdates version reference to 0.236.011
USER_SEARCH_TOAST_INLINE_MESSAGES_FIX.mdDocuments UX improvement replacing alerts with inline messages
SOVEREIGN_CLOUD_COGNITIVE_SERVICES_SCOPE_FIX.mdDocuments fix for hardcoded commercial Azure scope
RETENTION_POLICY_DOCUMENT_DELETION_FIX.mdPre-existing fix documentation (not changed in this PR)

Comment threadapplication/single_app/templates/admin_settings.html
Comment threadapplication/single_app/config.py
Comment threadapplication/single_app/templates/control_center.html
Comment threadapplication/single_app/route_backend_retention_policy.py
Comment threadapplication/single_app/route_backend_retention_policy.py
Comment threadapplication/single_app/templates/admin_settings.html
Comment threadapplication/single_app/templates/admin_settings.html
Comment threadapplication/single_app/templates/profile.html

@Bionic711Bionic711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved

@paullizer
Paul Lizer (paullizer) merged commit 74cccf4 into DevelopmentJan 22, 2026
10 checks passed
@paullizer
Paul Lizer (paullizer) deleted the add-default-retention-policy branch January 22, 2026 17:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@paullizer@Bionic711