diff --git a/addons/api/addon/generated/models/session-recording.js b/addons/api/addon/generated/models/session-recording.js index d78325880..f5e3c3606 100644 --- a/addons/api/addon/generated/models/session-recording.js +++ b/addons/api/addon/generated/models/session-recording.js @@ -112,12 +112,14 @@ export default class GeneratedSessionRecordingModel extends BaseModel { @attr('date', { description: 'The time until a session recording is required to be stored.', + readOnly: true, }) retain_until; @attr('date', { description: 'The time a session recording is scheduled to be automatically deleted.', + readOnly: true, }) delete_after; } diff --git a/ui/admin/app/routes/scopes/scope/add-storage-policy/index.js b/ui/admin/app/routes/scopes/scope/add-storage-policy/index.js index 91d0ba0ec..ae07dd5d8 100644 --- a/ui/admin/app/routes/scopes/scope/add-storage-policy/index.js +++ b/ui/admin/app/routes/scopes/scope/add-storage-policy/index.js @@ -22,13 +22,21 @@ export default class ScopesScopeAddStoragePolicyIndexRoute extends Route { */ async afterModel() { const { id: scope_id } = this.modelFor('scopes.scope'); - - //fetch policies from current scope - const orgScopePolicies = await this.store.query('policy', { + const currentScopePolicies = await this.store.query('policy', { scope_id, }); - this.policyList = orgScopePolicies; + if (scope_id === 'global') { + // Global scope should only list policies from its scope + this.policyList = currentScopePolicies; + } else { + // Org scope should list both global and org scope policies + const globalScopePolicies = await this.store.query('policy', { + scope_id: 'global', + }); + + this.policyList = [...globalScopePolicies, ...currentScopePolicies]; + } } /**