refactoring

This commit is contained in:
2018-07-16 02:36:44 +02:00
parent ee91fd6300
commit 4115f1ad06
20 changed files with 29 additions and 11 deletions

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Messaging namespace Yavsc.Abstract.Identity
{ {
public class ClientProviderInfo public class ClientProviderInfo
{ {

View File

@ -1,4 +1,4 @@
namespace Yavsc namespace Yavsc.Abstract.Identity
{ {
public interface IApplicationUser public interface IApplicationUser
{ {

View File

@ -1,4 +1,4 @@
namespace Yavsc namespace Yavsc.Abstract.Identity.Security
{ {
public interface ICircleAuthorization public interface ICircleAuthorization

View File

@ -1,4 +1,4 @@
namespace Yavsc namespace Yavsc.Abstract.Identity.Security
{ {
public interface ICircleAuthorized public interface ICircleAuthorized
{ {

View File

@ -1,6 +1,7 @@
using System;
namespace Yavsc.Abstract.Identity namespace Yavsc.Abstract.Identity
{ {
using System;
public class TokenInfo public class TokenInfo
{ {
public string AccessToken { get; set; } public string AccessToken { get; set; }

View File

@ -1,4 +1,4 @@
namespace Yavsc.Models.Auth namespace Yavsc.Abstract.Identity
{ {
public class UserInfo { public class UserInfo {

View File

@ -1,4 +1,6 @@
namespace Yavsc.Interfaces using Yavsc.Abstract.Identity;
namespace Yavsc.Interfaces
{ {
public interface ICircleMember: IIdentified<long> public interface ICircleMember: IIdentified<long>
{ {

View File

@ -1,4 +1,6 @@
 
using Yavsc.Abstract.Identity;
namespace Yavsc.Interfaces namespace Yavsc.Interfaces
{ {
public interface IGCMDeclaration public interface IGCMDeclaration

View File

@ -1,5 +1,5 @@
using System; using System;
using Yavsc.Models.Messaging; using Yavsc.Abstract.Identity;
namespace Yavsc.Interfaces namespace Yavsc.Interfaces
{ {

View File

@ -1,4 +1,5 @@
using System; using System;
using Yavsc.Abstract.Identity;
namespace Yavsc.Models namespace Yavsc.Models
{ {

View File

@ -1,5 +1,6 @@
namespace Yavsc namespace Yavsc
{ {
using Abstract.Identity;
public interface IContact public interface IContact
{ {
IApplicationUser Owner { get; set; } IApplicationUser Owner { get; set; }

View File

@ -17,6 +17,7 @@
// //
using System; using System;
using Yavsc.Abstract.Identity;
namespace Yavsc namespace Yavsc
{ {

View File

@ -5,6 +5,7 @@ namespace Yavsc.Models.Access
using Newtonsoft.Json; using Newtonsoft.Json;
using Yavsc; using Yavsc;
using Blog; using Blog;
using Yavsc.Abstract.Identity.Security;
public class CircleAuthorizationToBlogPost : ICircleAuthorization public class CircleAuthorizationToBlogPost : ICircleAuthorization
{ {

View File

@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq; using System.Linq;
using Newtonsoft.Json; using Newtonsoft.Json;
using Yavsc.Abstract.Identity.Security;
using Yavsc.Interfaces; using Yavsc.Interfaces;
using Yavsc.Models.Access; using Yavsc.Models.Access;
using Yavsc.Models.Relationship; using Yavsc.Models.Relationship;

View File

@ -8,11 +8,11 @@ using Yavsc.Models.Relationship;
using Yavsc.Billing; using Yavsc.Billing;
using System.Globalization; using System.Globalization;
using Yavsc.Helpers; using Yavsc.Helpers;
using Yavsc.Models.Messaging;
using System.Linq; using System.Linq;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using Yavsc.ViewModels.PayPal; using Yavsc.ViewModels.PayPal;
using Yavsc.Models.HairCut; using Yavsc.Models.HairCut;
using Yavsc.Abstract.Identity;
namespace Yavsc.Models.Haircut namespace Yavsc.Models.Haircut
{ {

View File

@ -22,6 +22,8 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Yavsc.Abstract.Identity;
using Yavsc.Abstract.Identity;
using Yavsc.Models.Auth; using Yavsc.Models.Auth;
using Yavsc.Models.Relationship; using Yavsc.Models.Relationship;

View File

@ -1,4 +1,6 @@
using Yavsc.Abstract.Identity;
namespace Yavsc.Models.Messaging namespace Yavsc.Models.Messaging
{ {
public class ProviderClientInfo : ClientProviderInfo public class ProviderClientInfo : ClientProviderInfo

View File

@ -1,3 +1,5 @@
using Yavsc.Abstract.Identity;
namespace Yavsc.Models.Auth namespace Yavsc.Models.Auth
{ {
public class Me : IApplicationUser { public class Me : IApplicationUser {

View File

@ -1,3 +1,5 @@
using Yavsc.Abstract.Identity;
using Yavsc.Abstract.Identity;
using Yavsc.Models.Auth; using Yavsc.Models.Auth;
namespace Yavsc.ViewModels.Administration namespace Yavsc.ViewModels.Administration

View File

@ -1,9 +1,9 @@
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
using System.Security.Claims;
using Yavsc.Models.Blog;
namespace Yavsc.ViewModels.Auth.Handlers namespace Yavsc.ViewModels.Auth.Handlers
{ {
using System.Security.Claims;
using Models.Blog;
public class BlogEditHandler : AuthorizationHandler<EditRequirement, BlogPost> public class BlogEditHandler : AuthorizationHandler<EditRequirement, BlogPost>
{ {
protected override void Handle(AuthorizationContext context, EditRequirement requirement, BlogPost resource) protected override void Handle(AuthorizationContext context, EditRequirement requirement, BlogPost resource)