Reusable templates feature desktop#1510
Open
Ajith-Penmatsa-GGL wants to merge 28 commits intoOWASP:mainfrom
Open
Reusable templates feature desktop#1510Ajith-Penmatsa-GGL wants to merge 28 commits intoOWASP:mainfrom
Ajith-Penmatsa-GGL wants to merge 28 commits intoOWASP:mainfrom
Conversation
…tion and setup the backend for the feature
- Add admin-only template repository initialization - Implement unified search across name, description, and tags - Handle repository states (NOT_CONFIGURED, NOT_INITIALIZED, REPO_NOT_FOUND) - Simplify search architecture by removing separate tag filtering - Update template schema to align with V2 model schema
… that they are unified to 3 status' and added clarity to the module that lets user pick the location of tempalte storage
Collaborator
Author
2 checks failing (desktop e2e and trivy scan):
fixed spell checks and markdown lint errors |
jgadsden
reviewed
Mar 23, 2026
Collaborator
There was a problem hiding this comment.
possible typo in the file name?
Collaborator
Author
There was a problem hiding this comment.
Yep I might’ve forgotten to delete that. There’s another file with the correct name that’s actually being used in the code, so the misspelled one is redundant. I’ll clean it up 🙂
Collaborator
|
I have added to the discussion on uses cases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This pr closes #1500
Templates feature extended to desktop
Created a template module that interacts with the local filesystem to store templates. All other workflows are essentially the same as the web version. The key difference is that when the frontend/Vuex store makes an API call, the desktop provider checks the current environment and routes the call via IPC (Inter-Process Communication) to the Node.js process running inside Electron, rather than hitting the Express REST API.
Read-only mode for manage templates portal is added and it is useful for teams sharing templates via a network folder or SharePoint where write access may be restricted. Users can point the app to an existing templates folder, set a custom location, or use the default path. This configuration is documented in the usage guide.
functionality to export templates onto local file system is now available for desktop users
Admin middleware
Previously, admin checks were being handled individually at the controller level on each endpoint. Extracted this into a dedicated
adminMiddlewarefunction and applied it centrally in the route configuration, so authorisation is enforced in one place.Normalised template states
With the addition of desktop templates, the status model needed to work across both the filesystem (desktop) and GitHub repositories (web). Unified the status states (
NOT_CONFIGURED,NOT_INITIALIZED,NOT_FOUND, ) acrossManageTemplates.vue,TemplateGallery.vue, andtemplateController.js. A separatecanWriteflag handles read-only state rather than a distinct status code.Test coverage
Added unit tests for
TemplateGallery,ManageTemplates,ExportTemplate,templateApi, and thetemplateVuex module.i18n strings
Reorganised i18n strings into clearly named objects. Removed redundant unused definitions and renamed keys for clarity.
Description for the changelog:
Extended templates feature to be compatible with desktop deployment, including local filesystem storage, read-only mode, and IPC-based communication between the frontend and Electron main process.
Declaration:
Thanks for submitting a pull request, please make sure:
(need to add unit tests for the template module that communicates with local file system)
ClaudeClaude sonnet 4.6