More cleanup
This commit is contained in:
parent
2f17516893
commit
6fb97321b4
@ -106,10 +106,10 @@ describe('PermissionsSelectComponent', () => {
|
|||||||
expect(input2.nativeElement.disabled).toBeTruthy()
|
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)
|
settingsService.set(SETTINGS_KEYS.AUDITLOG_ENABLED, false)
|
||||||
fixture = TestBed.createComponent(PermissionsSelectComponent)
|
fixture = TestBed.createComponent(PermissionsSelectComponent)
|
||||||
component = fixture.componentInstance
|
component = fixture.componentInstance
|
||||||
expect(component.allowedTypes).not.toContain('AuditLogEntry')
|
expect(component.allowedTypes).not.toContain('History')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -70,7 +70,7 @@ export class PermissionsSelectComponent
|
|||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
if (!this.settingsService.get(SETTINGS_KEYS.AUDITLOG_ENABLED)) {
|
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) => {
|
this.allowedTypes.forEach((type) => {
|
||||||
const control = new FormGroup({})
|
const control = new FormGroup({})
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
PermissionsService,
|
PermissionsService,
|
||||||
} from '../permissions.service'
|
} from '../permissions.service'
|
||||||
import { SettingsService } from '../settings.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'
|
import { AuditLogEntry } from 'src/app/data/auditlog-entry'
|
||||||
|
|
||||||
export const DOCUMENT_SORT_FIELDS = [
|
export const DOCUMENT_SORT_FIELDS = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user