Hello! To manage visibility based on user roles, you can use the invisible or requiredPolicy property. These properties help control which navigation items are shown depending on the user's permissions.
You can find more details about these properties in the ABP Framework codebase here.
For example, if you decide to use the invisible property, you can modify the navigation items like this:
import { ABP, AuthService, RoutesService } from '@abp/ng.core';
...
protected routes = inject(RoutesService);
updateRouteVisibility(name: string, invisible: boolean) {
const route = this.routes.find(route => route.name === name);
// const invisible = --you can add your own logic to decide visibility--
if (route) {
this.routes.patch(name, {
invisible: invisible,
} as Partial<ABP.Route>);
}
}
...
Let me know if you need further assistance on that.
Hello, you need to import PermissionDirective to the related module or the component if it is standalone. Let me know if you need further assistance on that.
I apologize for getting back to you this late.
You don't need to disable all output hashing. Instead, you can selectively control what gets hashed by configuring the outputHashing property in angular.json. For example, you could set "outputHashing": "media" to only hash media files while keeping your CSS and JS bundles with predictable names.
The available options are:
This selective approach lets you maintain predictable filenames for directly referenced assets while still benefiting from cache busting where needed. Just make sure your HTML references match the actual filenames generated during the build process.
Hi, thank you for reaching out — I understand how frustrating it can be to face a blocking issue.
Unfortunately, I am unable to reproduce the problem on my end, as it appears to have been resolved in this pull request for the previous version:
🔗 https://github.com/abpframework/abp/pull/22120
To better assist you, could you please provide more details about your current setup and the issue you are encountering? That way, I can help you identify a potential workaround or confirm if a fix is available.
Hello again, thank you for taking your time and sending me the project. However, since then the anti-virus program blocked me to inspect the project I could not check the issue.
Hello, I am delighted to hear that the workaround has solved your problem. The permanent fix will be available within the next patch release. You can follow this link regarding releases: https://github.com/abpframework/abp/releases
Thank you for your cooperation.
Hello, thank you for sharing the details of your issue. Unfortunately, I haven't been able to reproduce the problem on my end. If you're able to create a minimal, reproducible example and share it with me via email at sumeyye.kurtulus@volosoft.com, I'd be happy to take a closer look and assist you further.
Thank you for your cooperation!
Hello again Gabriel,
We are sorry for getting back to you this late.
I see that the config in the main ts.config.json file seems wrong. You will need to change the path reference like this:
//for angular/tsconfig.json
"@proxy": ["../modularcrm.products/angular/projects/products/src/lib/proxy/index.ts"],
"@proxy/*": ["../modularcrm.products/angular/projects/products/src/lib/proxy/*"]
//for modularcrm.products/angular/tsconfig.json
"@proxy": ["projects/products/src/lib/proxy/index.ts"],
"@proxy/*": ["projects/products/src/lib/proxy/*"]
I also want to remind that we have slightly updated this part in the latest version of the ABP Studio. The documentation will also be updated soon. However, I can also send you a sample project if you prefer.
Thank you for your cooperation. Let us know if you need further assistance on that.
Thank you for your follow-up. I’ve reviewed the configuration I mentioned, and I wasn’t able to reproduce the issue on my side.
To better understand and investigate the problem, could you kindly share a minimal, reproducible example of your project? You can refer to this guide for details: How to create a Minimal, Reproducible Example.
Once ready, please feel free to send it to sumeyye.kurtulus@volosoft.com, and we’ll be glad to take a closer look.
Hello again,
Apologies for the delayed response, and thank you for your patience and the detailed information you've provided.
After revisiting your implementation, I can confirm that the issue stems from the OpenID Connect library appending an unnecessary query string (?&&) that isn't properly handled. Normally, Angular routing takes care of cleaning up such artifacts, but unfortunately, this particular case falls outside of its scope.
As a temporary workaround until a permanent fix is released, I recommend the following approach:
import { OAuthService } from 'angular-oauth2-oidc';
export class AppComponent implements OnInit {
protected oauthService = inject(OAuthService);
protected windowService = inject(AbpWindowService);
ngOnInit() {
this.oauthService.events.subscribe(event => {
if (event.type === 'token_received') {
const rawQuery = window.location.search;
if (rawQuery && !rawQuery.includes('=')) {
this.windowService.reloadPage();
}
}
});
}
}
This solution listens for the token_received event and reloads the page when a malformed query string is detected, helping to mitigate the issue in both development and production environments.
Let me know if you need further assistance.