Skip to content

Add store-scoped contact attribute management to Grand.Web.Store#710

Merged
KrzysztofPajak merged 5 commits into
developfrom
feature/store-contact-attributes
Jun 8, 2026
Merged

Add store-scoped contact attribute management to Grand.Web.Store#710
KrzysztofPajak merged 5 commits into
developfrom
feature/store-contact-attributes

Conversation

@KrzysztofPajak

Copy link
Copy Markdown
Member

Store owners can create, edit and delete their own contact attributes. Global/shared attributes are visible in read-only preview mode (values visible, no add/edit/delete). Access to attributes from other stores is blocked at the controller level.

Resolves #issueNumber
Type: feature|bugfix|

Issue

Description of the issue this PR is solving, why it's happening, and how to reproduce it.

Solution

Summarize your solution to the problem. Please include short description.

Breaking changes

If you have a breaking changes, list them here, otherwise list none.

Testing

  1. List the steps needed for testing your PR.
  2. Assume that everyone already know how to run the GrandNode, and do the basic configuration.
  3. Be detailed enough that someone can work through it easily.

Store owners can create, edit and delete their own contact attributes.
Global/shared attributes are visible in read-only preview mode (values
visible, no add/edit/delete). Access to attributes from other stores
is blocked at the controller level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
KrzysztofPajak and others added 4 commits June 7, 2026 20:34
…ontactAttribute views

- Add ContactAttributeStoreProfile (Grand.Web.Store) to map ContactAttribute → ContactAttributeStoreModel via Grand.Mapping infrastructure
- Add ContactAttributeStoreModel inheriting ContactAttributeModel with IsReadOnly property
- Controller Edit GET now uses MapTo<ContactAttribute, ContactAttributeStoreModel>() instead of non-existent ToModel(model) overload
- Controller Edit POST returns ContactAttributeStoreModel on validation failure (drops ViewBag.IsReadOnly)
- Update Edit.cshtml, CreateOrUpdate.cshtml, TabInfo.cshtml, TabValues.cshtml to @model ContactAttributeStoreModel and Model.IsReadOnly
- Add Grand.Web.Store.Models.Messages using to _ViewImports.cshtml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…wBag.Title ternary

- Add admin.catalog.attributes.contactattributes.globalreadonly to DefaultLanguage.xml
- Simplify ViewBag.Title in Edit.cshtml (both ternary branches were identical)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Switch Create GET/POST to use ContactAttributeStoreModel so partial views render correctly
- Update Create.cshtml to @model ContactAttributeStoreModel
- Add ContactAttributeStoreValidator that reuses ContactAttributeValidator rules via FluentValidation Include + IValidator<in T> contravariance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@KrzysztofPajak KrzysztofPajak merged commit 47c9ef2 into develop Jun 8, 2026
6 checks passed
@KrzysztofPajak KrzysztofPajak deleted the feature/store-contact-attributes branch June 8, 2026 17:03
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.

1 participant