< Summary

Information
Class: Syki.Front.Auth.SkipUserRegisterAuthReqHandler
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Auth/SkipUserRegisterAuthReq.cs
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 16
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
HandleRequirementAsync()0%620%

File(s)

/home/runner/work/syki/syki/Front/Auth/SkipUserRegisterAuthReq.cs

#LineLine coverage
 1using Microsoft.JSInterop;
 2using Microsoft.AspNetCore.Authorization;
 3
 4namespace Syki.Front.Auth;
 5
 6public class SkipUserRegisterAuthReq : IAuthorizationRequirement { }
 7
 08public class SkipUserRegisterAuthReqHandler(ILocalStorageService localStorage) : AuthorizationHandler<SkipUserRegisterAu
 9{
 10    protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, SkipUserRegisterAuthReq re
 11    {
 012        var canSkipUserRegister = await localStorage.GetItemAsync("SkipUserRegister");
 13
 014        if (canSkipUserRegister == "True") context.Succeed(requirement);
 015    }
 16}