mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
Improvement for authentication module
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
|
||||
import { AuthType } from './auth-type';
|
||||
import { AuthStatus } from './models/auth-status.model';
|
||||
import { GenericConstructor } from '../shared/generic-constructor';
|
||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||
import { NormalizedAuthStatus } from './models/normalized-auth-status.model';
|
||||
import { NormalizedDSpaceObject } from '../cache/models/normalized-dspace-object.model';
|
||||
import { NormalizedEpersonModel } from '../eperson/models/NormalizedEperson.model';
|
||||
|
||||
export class AuthObjectFactory {
|
||||
public static getConstructor(type): GenericConstructor<DSpaceObject> {
|
||||
public static getConstructor(type): GenericConstructor<NormalizedDSpaceObject> {
|
||||
switch (type) {
|
||||
case AuthType.Eperson: {
|
||||
return NormalizedEpersonModel
|
||||
}
|
||||
|
||||
case AuthType.Status: {
|
||||
return AuthStatus
|
||||
return NormalizedAuthStatus
|
||||
}
|
||||
|
||||
default: {
|
||||
|
Reference in New Issue
Block a user