hi
I will ask our angular team. : )
hi
https://abp.io/support/questions/240/How-to-customize-the-MVC-login-page https://abp.io/community/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd
You can download the account module source code. And override the login page.
If you have openiddict, the login page base class is OpenIddictSupportedLoginModel
[ExposeServices(typeof(LoginModel))]
public class OpenIddictSupportedLoginModel: LoginModel
https://abp.io/support/questions/632/How-can-I-download-the-source-code-of-the-framework-Angular-packages-theme-and-pro-modules
https://abp.io/support/questions/160/How-to-customize-an-ABP-project
hi
You can add a service to store the current user id
and connection id
.
Maintain the dictionary in OnConnectedAsync/OnDisconnectedAsync
, then get connection id by user id(GetConnectionIdsByKey)
public class QaUiConnectionStore : ISingletonDependency
{
private readonly Dictionary<string, HashSet<string>> _connections = new();
public void AddConnection(string key, string connectionId)
{
lock (_connections)
{
if (!_connections.ContainsKey(key))
{
_connections.Add(key, new HashSet<string>());
}
lock (_connections[key])
{
_connections[key].Add(connectionId);
}
}
}
public IEnumerable<string> GetConnectionIdsByKey(string key)
{
if (_connections.TryGetValue(key, out var connection))
{
return connection;
}
return Enumerable.Empty<string>();
}
public void RemoveConnection(string key, string connectionId)
{
lock (_connections)
{
if (!_connections.TryGetValue(key, out var connection))
{
return;
}
lock (connection)
{
connection.Remove(connectionId);
if (connection.Count == 0)
{
_connections.Remove(key);
}
}
}
}
}
public class QaUiNotificationHub : AbpHub<IQaUiNotificationClient>
{
private readonly QaUiConnectionStore _qaUiConnectionStore;
public QaUiNotificationHub(QaUiConnectionStore qaUiConnectionStore)
{
_qaUiConnectionStore = qaUiConnectionStore;
}
public override Task OnConnectedAsync()
{
if (IsUserAuthenticated())
{
var key = CurrentUser.Id.ToString();
_qaUiConnectionStore.AddConnection(key, connectionId: Context.ConnectionId);
}
return base.OnConnectedAsync();
}
public override Task OnDisconnectedAsync(Exception? exception)
{
if (IsUserAuthenticated())
{
var key = CurrentUser.Id.ToString();
_qaUiConnectionStore.RemoveConnection(key, connectionId: Context.ConnectionId);
}
return base.OnDisconnectedAsync(exception);
}
private bool IsUserAuthenticated()
{
return CurrentUser.IsAuthenticated && CurrentUser.Id.HasValue;
}
}
tenancy, so how can I turn off or remove this features please?
Remove the saas module from your solution.
Similar question re OpenID, it is not something I knowingly need / want to use, so how can I remove it/
What do you mean re OpenID
? OpenIddict?
N.B. This is in a Application (Single Layer) template. I note if creating a Application (Layered) then you get option to check or uncheck Saas and OpenID etc, but for whatever reason with Application (Single Layer) you don't get a choice? N.B. 2. I am using ABP Studio. I note looking at ABP CLI documentations there seems to be switches to not include saas, openid etc, but as above these don't appear in ABP Studio for single layer template
You can temporarily manually remove the modules you don't need, and we will support more templates in the future.
ok, I see your point.
I don't understand why we need to create the template project ourselves for this.
Because the template project contains the license info, that's why you need to create it and share it. Then, I will add the code for you.
Thanks.
hi
Does your application not need to support multiple languages?
If so, you can remove all languages in your application, and this menu will be hidden.
Thanks. I will forward to our angular team.
I want different database for custom module. One is default connection string and ModuleConnectionString.
See https://abp.io/docs/latest/framework/fundamentals/connection-strings https://abp.io/docs/latest/framework/data/entity-framework-core/migrations
hi
You need to add the docs web modules to your Blazor WASM
UI project.
The AdministrationService
is a microservice, it doesn't contain UI.
Also add docs API route
to gateways.