More cleanup

This commit is contained in:
shamoon 2024-04-14 00:10:00 -07:00
parent 2f17516893
commit 6fb97321b4
3 changed files with 4 additions and 4 deletions

View File

@ -106,10 +106,10 @@ describe('PermissionsSelectComponent', () => {
expect(input2.nativeElement.disabled).toBeTruthy()
})
it('should exclude auditlogentry permissions if disabled', () => {
it('should exclude history permissions if disabled', () => {
settingsService.set(SETTINGS_KEYS.AUDITLOG_ENABLED, false)
fixture = TestBed.createComponent(PermissionsSelectComponent)
component = fixture.componentInstance
expect(component.allowedTypes).not.toContain('AuditLogEntry')
expect(component.allowedTypes).not.toContain('History')
})
})

View File

@ -70,7 +70,7 @@ export class PermissionsSelectComponent
) {
super()
if (!this.settingsService.get(SETTINGS_KEYS.AUDITLOG_ENABLED)) {
this.allowedTypes.splice(this.allowedTypes.indexOf('AuditLogEntry'), 1)
this.allowedTypes.splice(this.allowedTypes.indexOf('History'), 1)
}
this.allowedTypes.forEach((type) => {
const control = new FormGroup({})

View File

@ -19,7 +19,7 @@ import {
PermissionsService,
} from '../permissions.service'
import { SettingsService } from '../settings.service'
import { SETTINGS, SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { AuditLogEntry } from 'src/app/data/auditlog-entry'
export const DOCUMENT_SORT_FIELDS = [