Edit Content: Create Guard to handle redirect between new and old version
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Summary
Right now in our codebase, we have to manually check all the time if we are able to navigate to the new Edit Content Screen, leading to duplicated logic, fetchs and code.
We should use the already existing editContentGuard for this behavior.
And remove all calls of dotContentTypeService that leads to a redirect due to lack or presence of permissions for accessing the new Edit Content.
An ideal solution would be to not do any call at all and have this information locally.
Acceptance Criteria
- We should centralize the logic to check if a Content Type or Content is able to enter the new portlet at route level
- Double check all instances of
dotContentTypeServiceto prevent more calls to do redirects - Be sure that the new logic covers all edge cases covered by the already existing code
dotCMS Version
trunk_latest
Proposed Objective
User Experience
Proposed Priority
Priority 3 - Average
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core-web/apps/dotcms-ui/src/app/api/services/guards/edit-content.guard.ts to understand the existing guard, then search the core-web codebase for dotContentTypeService calls that trigger redirects. Centralize the route-level checks and verify that all existing permission and content-type edge cases remain covered without redundant calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100