Base solution for your next web application

Activities of "ivanosw1"

Hi,

I'm not able to make google authentication work. I've configured oAuth2 url and redirect url to <a class="postlink" href="http://localhost:4200">http://localhost:4200</a> in console developer.

In console log after a successful login, I've this error: Uncaught TypeError: Cannot read property '_tokenAuthService' of undefined at webpackJsonp.1501.LoginService.googleLoginStatusChangeCallback (login.service.ts:260) at Function.<anonymous> (cb=gapi.loaded_0:154) at MessagePort.c.port1.onmessage (cb=gapi.loaded_0:72)

Any idea?

Thanks

Hi, is there something not much clear in my question that nobody can answer ?

How can I obtain support on this issue?

Thanks for response.

I've changed the code. The call flow is same as before but I can give you more informations:

  • On gapi.auth2.getAuthInstance().isSignedIn.listen((isSignedIn) , isSignedIn is true;
  • this._tokenAuthService is type of TokenAuthServiceProxy
  • post to <a class="postlink" href="http://localhost:22742/api/TokenAuth/ExternalAuthenticate">http://localhost:22742/api/TokenAuth/Ex ... thenticate</a> return http 500 and the server error is System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden). in System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() in Softwareuno.unoins.Web.Authentication.External.Google.GoogleAuthProviderApi.<GetUserInfo>d__1.MoveNext() in C:\Uno\Boilerplate\PhoneBook\aspnet-core\src\Softwareuno.unoins.Web.Core\Authentication\External\Google\GoogleAuthProviderApi.cs:riga 30

I hope this can help you. Thanks

Ok guys. I got it.

Sorry for my inexperience. I didn't know the Google+ API must be enabled on google api manager. Once enabled google auth works like a charm.

Thank you so much.

Hi, The scenario is:

[AbpAuthorization('MakeThisMyRootThing')] public void MakeThisMyRottThing { ... do something var infos =ReadPrivateInfo(); ... do something }

[AbpAuthorization('ReadPrivateInfo') public List<Ino> ReadPrivateInfo { return new list<Info>(); }

I wondering how grant a user only one root permission, eg MakeThisMyRootThing, and allow this method to call all other protected methods (potentially written by third person like Abp) without remove the permission. This is usefull when I want to grant a permission to a process and not to every single call chain, but some of the chain methods may be called individually and so the permission is needed.

Thanks, Ivano

Hi, I've developed a plugin module that is successfully loaded by Abp. (dotnetcore) I made a different dbcontext and I can use IRepository<myentity> and also IRepository<RolePermisionSetting>, but I'm unable to use IRepository<Role> . There is alway an error of DI. How can I use in my outer module all the security/admin stuff of abp.zero ?

Thanks

Shure, it's very simple. Only one table CuwPermission. I wuold like to use IRepository<Role>, IRepository<User>, and so on.

public class CartellaUtenteWebContext: AbpDbContext { public virtual DbSet<CuwPermission> CuwPermissions { get; set; }

    /* Default constructor is needed for EF command line tool. */
    public CartellaUtenteWebContext()
        : base(GetConnectionString())
    {

    }

.... omitted ctors code

DomainService where I need Role Repository:

public class CuwRoleDomainService: DomainService, ICuwRoleDomainService { private readonly IRepository<Role> roleRepository; public CuwRoleDomainService(IRepository<Role> roleRepository) { this.roleRepository = roleRepository; }

    public async Task&lt;Role&gt; GetRoleAsync(int roleId)
    {
        var result = await roleRepository.FirstOrDefaultAsync(roleId);
        return result;
    }
}

Thanks

Hi,

The module is outside of abpzero template solution (host). The scenario is that many developers build their own plugins and at the end all plugins are deployed on a remote server. Nobody can access to the host solutions.

I've resolved in this manner :

  • created a nuget package from abpzero core module.
  • referenced this package on our core plugin module
  • set DependsOn to abpzero core module

It seems to work fine and when you improve abpzero template, we need only to upgrade the nuget package.

Do you think is a correct way ?

Hi, I've a table with IMayHaveTenantId created with some host data. In code I need to get all Host's data plus Tenant's data. This is a simple step: for host query inside a using (unitOfWorkManager.Current.SetTenantId(null)) and after this query for tenant. So far so good.

The problem is when I configure a new Tenant in a second database. When I query for host's data the query is executed against the second database and not where I guess, in the first created host database. This behaviour forces me to duplicate host data for every separated tenant database (and keep them in sync). There is a workaround in order to have only a single source of host's data ?

Thank you. Ivano

This is the code. A simple list of items shared between host and tenant. Tenant is on separated database. I would like to manage only one host list for every tenant either local or separate. Host and Tenant 1 on DB1 Tenant2 on DB2

// This call is authenticated as Tenant2 and host items are retrived from host table in DB2.

var dtos = new List<DossierStateTypeDto>();

        // Host 
        using (CurrentUnitOfWork.SetTenantId(null)) 
        {
            var hostItems = await dossierStateTypeRepository.GetAllListAsync();
            dtos.AddRange(hostItems.MapTo&lt;List&lt;DossierStateTypeDto&gt;>());
        }

        // Tenant
        var tenantItems = await dossierStateTypeRepository.GetAllListAsync();
        dtos.AddRange(tenantItems.MapTo&lt;List&lt;DossierStateTypeDto&gt;>());

        var result = new ListResultDto&lt;DossierStateTypeDto&gt;(dtos);
        return result;

Thanks, Ivano

Showing 1 to 10 of 178 entries