Skip to content

Implementing store owner settings management#695

Draft
Copilot wants to merge 4 commits into
developfrom
copilot/allow-store-owner-settings
Draft

Implementing store owner settings management#695
Copilot wants to merge 4 commits into
developfrom
copilot/allow-store-owner-settings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

Adds a settings management interface for store owners in the Store area, and makes merchandise return reasons and actions per-store.

Changes Made

  • Store Settings Controller: Added SettingController.cs in Grand.Web.Store/Controllers/ with GeneralCommon, Catalog, Customer, Sales, Media, and Content settings actions
  • Store Settings Views: Created views in Grand.Web.Store/Areas/Store/Views/Setting/
  • View Imports: Updated _ViewImports.cshtml to include Settings model namespaces
  • Admin Site Map: Updated StandardAdminSiteMap.cs to restrict Push notifications, Admin search, and System settings to System permission
  • Migration: Added MigrationUpdateAdminSiteMap in Migrations/2.4/ (Priority 1, runs after the DB version upgrade migration)
  • Per-Store Merchandise Return Reasons & Actions:
    • Added IStoreLinkEntity (LimitedToStores + Stores) to MerchandiseReturnReason and MerchandiseReturnAction domain entities
    • Updated IMerchandiseReturnService.GetAllMerchandiseReturnReasons/Actions() to accept an optional storeId parameter for store-scoped filtering
    • Updated cache keys to be per-store to avoid cross-store cache contamination
    • Updated MerchandiseReturnReasonModel / MerchandiseReturnActionModel to implement IStoreLinkModel
    • Updated AutoMapper profiles to correctly map LimitedToStores and Stores
    • Updated GetMerchandiseReturnHandler to pass the current store ID so customers only see reasons/actions for their store
    • Updated the Store SettingController to filter lists by current store and auto-assign the store when creating new items

- Add SettingController to Grand.Web.Store with GeneralCommon,
  Catalog, Customer, Sales, Media (no file manager), Content actions
- Create views and partials for all settings pages in Store area
- Media settings preserve file manager fields (AllowedFileTypes,
  FileManagerEnabledCommands, FileManagerDisabledUICommands)
- Add Settings model namespace to Store _ViewImports.cshtml
- Restrict PushNotifications/AdminSearch/SystemSettings SiteMap entries
  to ManageSystem permission so store managers cannot see them
- Add migration 2.5 to update existing installations

Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/e0160bcc-7e3e-4cd7-9f36-e0a1f176f95b

Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
@KrzysztofPajak
Copy link
Copy Markdown
Member

@copilot migration to version 2.4

Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/25e0c368-068f-46b8-9ec9-e6ba9aeee5a4

Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 17, 2026

@copilot migration to version 2.4

Done — the migration has been moved to version 2.4 (commit f57c54d). It now lives in Migrations/2.4/MigrationUpdateAdminSiteMap.cs with Priority => 1 so it runs after MigrationUpgradeDbVersion_24 which has Priority => 0.

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@KrzysztofPajak
Copy link
Copy Markdown
Member

@copilot Merchandise return reasons and Merchandise return actions, need to be per store

Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/1bb61bfc-6900-4ff3-928d-0e52909309b9

Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 18, 2026

@copilot Merchandise return reasons and Merchandise return actions, need to be per store

Done in commit d8a2037. Both MerchandiseReturnReason and MerchandiseReturnAction now implement IStoreLinkEntity (LimitedToStores + Stores fields). The service's GetAll* methods accept an optional storeId and filter accordingly. The Store SettingController automatically scopes the list to the current store and pre-assigns the store when creating new items. The public-facing GetMerchandiseReturnHandler also passes the current store ID so customers only see reasons/actions relevant to their store.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ccsca2021.crl.certum.pl
    • Triggering command: /usr/share/dotnet/dotnet dotnet build src/Web/Grand.Web.Store/Grand.Web.Store.csproj -v q mmandHandler.cs ndHandler.cs (dns block)
  • ccsca2021.ocsp-certum.com
    • Triggering command: /usr/share/dotnet/dotnet dotnet build src/Web/Grand.Web.Store/Grand.Web.Store.csproj -v q mmandHandler.cs ndHandler.cs (dns block)
  • crl.certum.pl
    • Triggering command: /usr/share/dotnet/dotnet dotnet build src/Web/Grand.Web.Store/Grand.Web.Store.csproj -v q mmandHandler.cs ndHandler.cs (dns block)
  • subca.ocsp-certum.com
    • Triggering command: /usr/share/dotnet/dotnet dotnet build src/Web/Grand.Web.Store/Grand.Web.Store.csproj -v q mmandHandler.cs ndHandler.cs (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants