Hi devteambiz
Here, users who do not have the admin role cannot access the Settings page. If you want to check an external permission, you can add permissions accordingly on the permission side.
Hi Bernard
Make sure you change the return type and signature of the method. You can also check these by indicating whether the Create or Edit condition is met in the CreateOrEdit method you use in javascript.
Hi Bernard
If the return value is to be sent to the service methods here, it would be more appropriate to do this in a class. Example:
public class CreatePersonOutput
{
public int Id { get; set; }
}
You can make this change in your method:
[AbpAuthorize(AppPermissions.Pages_Persons_Create)]
protected virtual async Task<CreatePersonOutput> Create(CreateOrEditPersonDto input)
{
var person = ObjectMapper.Map<Person>(input);
if (AbpSession.TenantId != null)
{
person.TenantId = (int?)AbpSession.TenantId;
}
person.Color = GenerateRandomColor();
await _personRepository.InsertAsync(person);
await CurrentUnitOfWork.SaveChangesAsync();
return new CreatePersonOutput { Id = person.Id};
}
Hi devteambiz
Could you please share the log details of the section where the error occurred?
Hi devteambiz
This situation you specified is not supported. The user must manually change the LDAP settings from the Settings page.
Hi mmorales
1- Ensure that the paths in the COPY commands match the actual structure of your repository. For instance, if the WebPortal.Web.Host.csproj
file is actually located in /src/WebPortal.Web.Host/
relative to your repository root, your Dockerfile's COPY command should correctly reflect this.
2- If the .csproj
files are in the correct locations, try adjusting the COPY paths in your Dockerfile as follows:
src/
directory from the COPY statements:/src/src/WebPortal.Web.Host
to /src/WebPortal.Web.Host
to align with the correct directory structure during the Docker build.FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["WebPortal.Web.Host/WebPortal.Web.Host.csproj", "WebPortal.Web.Host/"]
COPY ["WebPortal.Web.Core/WebPortal.Web.Core.csproj", "WebPortal.Web.Core/"]
COPY ["WebPortal.Application/WebPortal.Application.csproj", "WebPortal.Application/"]
COPY ["WebPortal.Application.Shared/WebPortal.Application.Shared.csproj", "WebPortal.Application.Shared/"]
COPY ["WebPortal.Core.Shared/WebPortal.Core.Shared.csproj", "WebPortal.Core.Shared/"]
COPY ["WebPortal.Core/WebPortal.Core.csproj", "WebPortal.Core/"]
COPY ["WebPortal.EntityFrameworkCore/WebPortal.EntityFrameworkCore.csproj", "WebPortal.EntityFrameworkCore/"]
COPY ["WebPortal.GraphQL/WebPortal.GraphQL.csproj", "WebPortal.GraphQL/"]
RUN dotnet restore "WebPortal.Web.Host/WebPortal.Web.Host.csproj"
COPY . .
WORKDIR "/src/WebPortal.Web.Host"
RUN dotnet build "WebPortal.Web.Host.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "WebPortal.Web.Host.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebPortal.Web.Host.dll"]
Hi Bernard
As far as I understand, you want to perform a create operation using the service method and this method has a return value, which you want to receive on the Javascript side. After correcting the return value of the service method here, you can use the sample code on the Javascript side.
_exampleService
.exampleMethod({
id: exampleId,
})
.done(function (result) {
console.log(result);
});
With this usage, you can get the values returned in the service method.
Hi Bernard
Here, you can return the returned value as JsonResult
, although it varies depending on where you use it. However, if the other fields are not empty but id is empty, it may need to be met in a different format.
Hi devteambiz,
Please ensure that the HttpHeaderTenantResolveContributor
structure is implemented as described in the document found here. This way, the TenantId
will attempt to retrieve its information from the Abp.TenantId
header.
Hi devteambiz
Which user's information did you try to log in with in the body section of the TokenAuth/Authenticate
post request?
Could you please give some more details?