I hereby claim:
- I am lukichev on github.
 - I am lukichev_a (https://keybase.io/lukichev_a) on keybase.
 - I have a public key ASC7nXOujOvkWntVGciBhAUUhy7YfxY-hf_W1wB8TZVOaAo
 
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; | |
| import { AuthService } from '../../_auth/auth.service'; | |
| import { AccountType } from '../../accounts/accounts.service'; | |
| import { UserRole } from '../../users/user.model'; | |
| @Directive({ | |
| selector: '[dcmPermission]', | |
| }) | |
| export class PermissionDirective { | 
| import { Injectable, Injector } from '@angular/core'; | |
| import { | |
| HttpErrorResponse, | |
| HttpEvent, | |
| HttpHandler, | |
| HttpHeaders, | |
| HttpInterceptor, | |
| HttpRequest, | |
| HttpResponse | |
| } from '@angular/common/http'; | 
| // auth.guard.ts | |
| import {Injectable} from '@angular/core'; | |
| import {Router, CanActivate, RouterStateSnapshot, ActivatedRouteSnapshot} from '@angular/router'; | |
| import {AuthService} from './auth.service'; | |
| @Injectable() | |
| export class AuthGuard implements CanActivate { | |
| constructor(private router: Router, | |
| private authService: AuthService) { | |
| } | 
| // | |
| // auth.module.ts | |
| // | |
| import {NgModule} from '@angular/core'; | |
| import {AuthenticatedHttpService} from "./http.interceptor"; | |
| @NgModule({ | |
| providers: [ | |
| {provide: Http, useClass: AuthenticatedHttpService} | |
| ] | 
| angular | |
| .module('winzzy.games', [ | |
| 'winzzy.core' | |
| ]) | |
| .config(configure); | |
| /** @ngInject */ | |
| function configure($stateProvider) { | |
| $stateProvider | |
| .state('games', { | 
| class AsideComponent { | |
| /** @ngInject */ | |
| constructor($rootScope, Authentication, CONFIG, $timeout) { | |
| this.$rootScope = $rootScope; | |
| this.$timeout = $timeout; | |
| this.Authentication = Authentication; | |
| this.aside_width = CONFIG.aside_menu_width; | |
| this.loading = false; | |
| this.menu = [ | 
| class AuthenticationService { | |
| /** @ngInject */ | |
| constructor($rootScope, $http, $q, Storage, CONFIG, $timeout, ErrorService, AccountService, PermRoleStore) { | |
| this.$rootScope = $rootScope; | |
| this.$http = $http; | |
| this.$q = $q; | |
| this.Storage = Storage; | |
| this.CONFIG = CONFIG; | |
| this.$timeout = $timeout; | |
| this.ErrorService = ErrorService; | 
| 'use strict'; | |
| require('dotenv').config({ silent : true }); | |
| /** | |
| * Libraries | |
| */ | |
| const | |
| fs = require('fs'), | |
| boolean = require('boolean'), | 
| var debug = require('debug')('jindy:models:message'); | |
| var Promise = require('bluebird'); | |
| var app = require('../app'), | |
| errors = require('../errors'); | |
| module.exports = function(sequelize, DataTypes) { | |
| var Message = sequelize.define('Message', { | |
| text : { |