-
Notifications
You must be signed in to change notification settings - Fork 2.9k
User group: add description to user group (closes #14986) #21057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
29edc58
Adding description to user groups
LanThuyNguyen edc9287
Add description to dto and test and umbraco plan
LanThuyNguyen 971e747
update unit test for user group
LanThuyNguyen d0e1647
remove change from link picker
LanThuyNguyen 9368725
edit icon ui for user group
LanThuyNguyen abc4aa9
Fixed table exists check in migration.
AndyButland 7a8bb7d
Merge branch 'main' into v17/add-description-to-user-group
andr317c f7e59f9
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen 81c3091
update description in table user groups
LanThuyNguyen dabd7e7
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen 7759309
update user group editor css
LanThuyNguyen 3867349
Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into v1…
LanThuyNguyen 0b982fa
update description default
LanThuyNguyen d655015
remove description column element
LanThuyNguyen 76667f5
fix conflict
LanThuyNguyen 7367e96
add ignore large method
LanThuyNguyen f561b66
remove codesence
LanThuyNguyen da2c09f
update user group descriptions default
LanThuyNguyen c707c8c
Merge branch 'main' into v17/add-description-to-user-group
AndyButland cc39b1d
Added description to constructor of ReadOnlyUserGroup.
AndyButland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/AddDescriptionToUserGroup.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| using Umbraco.Cms.Core; | ||
| using Umbraco.Cms.Infrastructure.Persistence.Dtos; | ||
|
|
||
| namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_17_1_0 | ||
NguyenThuyLan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| /// <summary> | ||
| /// Migration to add a description column to the user group table. | ||
| /// </summary> | ||
| public class AddDescriptionToUserGroup : AsyncMigrationBase | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="AddDescriptionToUserGroup"/> class. | ||
| /// </summary> | ||
| /// <param name="context">The migration context.</param> | ||
| public AddDescriptionToUserGroup( | ||
| IMigrationContext context) | ||
| : base(context) | ||
| { | ||
| } | ||
|
|
||
| /// <inheritdoc/> | ||
| protected override async Task MigrateAsync() | ||
| { | ||
| if (TableExists(Constants.DatabaseSchema.Tables.UserGroup) is false) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| const string ColumnName = "description"; | ||
| var hasColumn = Context.SqlContext.SqlSyntax.GetColumnsInSchema(Context.Database) | ||
| .Any(c => | ||
| c.TableName == Constants.DatabaseSchema.Tables.UserGroup && | ||
| c.ColumnName == ColumnName); | ||
|
|
||
| if (hasColumn) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| AddColumn<UserGroupDto>(Constants.DatabaseSchema.Tables.UserGroup, ColumnName); | ||
| } | ||
| } | ||
| } | ||
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.