import { IRoleService } from './role.service' ; import { IUserIdentity } from '../../../../index' ; import { injectable } from 'inversify' ; export abstract class IOrderService { abstract isAllowed ( ) ; abstract loggedIn ( ) ; } @ injectable ( ) export class OrderService implements IOrderService { constructor ( private roleService , private userIdentity ) { } isAllowed ( ) { return this . userIdentity . get ( 'allow' ) ; } loggedIn ( ) { return this . roleService . getLoggedIn ( ) ; } }