Add store-scoped contact attribute management to Grand.Web.Store#710
Merged
Conversation
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>
…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>
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.
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