Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "bolenton"

Thanks @ismcagdas, I guess it will not grant any of the permissions for host user but, I want to remove only some permissions for host user, not all of them. So, is there something like we set some flag/parameter for permissions so that we can identify at the time of granting the permission which must be granted and which must be not.

I am actually thinking of overriding the CreateChildPermission() and set some flag, but I don't have the implementation of CreateChildPermission().

Thanks

Hi, I want to remove/prohibit some permissions for Superadmin(Host user) in the seed method. For host user, all permissions from AppAuthorizationProviderare granted. How can we prohibit some permissions for host user in seed method only?

This is how we grant permissions in seed method:

var permissions = PermissionFinder
                    .GetAllPermissions(new AppAuthorizationProvider(true))
                    .Where(p => p.MultiTenancySides.HasFlag(MultiTenancySides.Host))
                    .ToList();

                foreach (var permission in permissions)
                {

                    if((permission.Parent!=null && permission.Parent.Name != AppPermissions.Pages_Companies) 
                        ||
                        (permission.Name != AppPermissions.Pages_Companies))
                    {
                        _context.Permissions.Add(
                          new RolePermissionSetting
                          {
                              TenantId = null,
                              Name = permission.Name,
                              IsGranted = true,
                              RoleId = adminRoleForHost.Id
                          });
                    }                    
                }

Thanks.

That worked perfectly. Thanks @ismcagdas!

I just did a normal ng build. I did't add the --prod flag.

I got this working now Thanks guys!

The last piece I was missing was that I needed to add the wildcard in my DNS as a CNAME and also add it to azure as well.

Finally I notice a lot of errors in my console. Does not seem to be effecting anything, but does anyone know how I can solve this?

I was finally able to successfully deploy my Angular app to Azure.

Now I am trying to set up the domains so that the domains wildcards will work. For example if user types in default.myapp.com, they should be on the default tenant. I have connected my domain (managed from google domains) to the azure app.

Currently when I try default.myapp.com I get this error.

What am I missing?

I am on the Latest version 5.0.6

Question

When I do a ng build, my project builds fine. However when I do a ng build --prod I get the following error. Does anybody have any idea why this is?

ERROR in ./node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:9341:18)
    at assignContextualParameterTypes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41948:29)
    at checkExpressionWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42959:28)
    at checkExpression (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42898:42)
    at checkExpressionCached (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42779:38)
    at checkReturnStatement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:45418:54)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46763:28)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at checkBlock (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:44563:16)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46742:28)
    at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41990:21)
    at checkDeferredNodes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46828:25)
    at checkSourceFileWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46863:17)
    at checkSourceFile (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46842:13)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at getDiagnosticsWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46924:16)
    at getDiagnostics (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46892:24)
    at Object.getEmitResolver (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:27162:13)
    at emitWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69722:69)
    at C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69687:66
    at runWithCancellationToken (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69779:24)
 @ ./node_modules/rxjs/_esm5/observable/bindNodeCallback.js 2:0-76
 @ ./node_modules/rxjs/_esm5/add/observable/bindNodeCallback.js
 @ ./node_modules/rxjs/_esm5/Rx.js
 @ ./src/account/login/validate-two-factor-code.component.ts
 @ ./src/account/account.module.ngfactory.js
 @ ./src/$$_lazy_route_resource lazy
 @ ./node_modules/@angular/core/esm5/core.js
 @ ./src/main.ts
 @ multi ./src/main.ts
ERROR in ./node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
    at Object.getEffectiveTypeAnnotationNode (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:9341:18)
    at assignContextualParameterTypes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41652:25)
    at checkFunctionExpressionOrObjectLiteralMethod (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41948:29)
    at checkExpressionWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42959:28)
    at checkExpression (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42898:42)
    at checkExpressionCached (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:42779:38)
    at checkReturnStatement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:45418:54)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46763:28)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at checkBlock (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:44563:16)
    at checkSourceElement (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46742:28)
    at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:41990:21)
    at checkDeferredNodes (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46828:25)
    at checkSourceFileWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46863:17)
    at checkSourceFile (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46842:13)
    at Object.forEach (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:1506:30)
    at getDiagnosticsWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46924:16)
    at getDiagnostics (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:46892:24)
    at Object.getEmitResolver (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:27162:13)
    at emitWorker (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69722:69)
    at C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69687:66
    at runWithCancellationToken (C:\Users\bolen\Desktop\Project Churnite\Churnite\angular\node_modules\typescript\lib\typescript.js:69779:24)
 @ ./node_modules/rxjs/_esm5/observable/bindCallback.js 2:0-68
 @ ./node_modules/rxjs/_esm5/add/observable/bindCallback.js
 @ ./node_modules/rxjs/_esm5/Rx.js
 @ ./src/account/login/validate-two-factor-code.component.ts
 @ ./src/account/account.module.ngfactory.js
 @ ./src/$$_lazy_route_resource lazy
 @ ./node_modules/@angular/core/esm5/core.js
 @ ./src/main.ts
 @ multi ./src/main.ts
Question

Everytime I try to change tanent I get a 500. The code always seems to trow the exception on the below block, but I can't seem to figure out why.

Issue Resolved

Thanks

Showing 11 to 20 of 41 entries