From 5f2c7677d96ef3bb5a85fada5cbad0229f4184a6 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Wed, 10 Jul 2024 19:10:23 -0400 Subject: [PATCH 01/12] Foundation for group assignment behavior change --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAM/Pages/Groups/ViewGroup.razor | 15 ++++++++---- BLAZAM/Pages/Users/ViewUser.razor | 24 +++++++++++-------- BLAZAMGui/UI/DirectoryEntryViewHeader.razor | 8 ++----- .../UI/Groups/AssignToModalContent.razor | 9 +++---- BLAZAMGui/UI/Groups/MemberOfList.razor | 4 ++-- BLAZAMGui/UI/Inputs/ADAutoComplete.razor | 6 +++++ .../UI/Inputs/ADAutoCompleteResult.razor | 5 +++- BLAZAMGui/UI/Inputs/MudSelectList.razor | 1 + BLAZAMGui/UI/Outputs/NoAccess.razor | 10 ++++++++ BLAZAMServices/Background/ConnMonitor.cs | 8 +------ 11 files changed, 56 insertions(+), 36 deletions(-) create mode 100644 BLAZAMGui/UI/Outputs/NoAccess.razor diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 838825bf..004c73ea 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 0.9.3 - 2024.07.09.2316 + 2024.07.10.2244 false BLAZAM False diff --git a/BLAZAM/Pages/Groups/ViewGroup.razor b/BLAZAM/Pages/Groups/ViewGroup.razor index b4e09a18..78585fe1 100644 --- a/BLAZAM/Pages/Groups/ViewGroup.razor +++ b/BLAZAM/Pages/Groups/ViewGroup.razor @@ -94,12 +94,17 @@ - -
- -
-
+ + @if (Group.CanReadField(ActiveDirectoryFields.MemberOf)) + { + +
+ + +
+
+ } diff --git a/BLAZAM/Pages/Users/ViewUser.razor b/BLAZAM/Pages/Users/ViewUser.razor index 4e178249..708ef6b6 100644 --- a/BLAZAM/Pages/Users/ViewUser.razor +++ b/BLAZAM/Pages/Users/ViewUser.razor @@ -71,7 +71,7 @@ } - + @if (LogonHoursModal?.IsShown == true) { @@ -163,17 +163,21 @@ - @if (User.CanReadField(ActiveDirectoryFields.MemberOf)) - { - - @AppLocalization["Groups"] - {AssignToModal?.Show();}) Model="User" /> - + + @AppLocalization["Groups"] + @if (User.CanReadField(ActiveDirectoryFields.MemberOf)) + { + {AssignToModal?.Show();}) Model="User" /> + } + else + { + + } + - } @@ -272,8 +276,8 @@ @AppLocalization["Log On To"] - } - + } + @if (User.CanReadField(ActiveDirectoryFields.LogonHours)) { @@ -83,7 +83,6 @@ @@ -167,10 +166,7 @@ { Unlock... } - @if (groupableEntry?.CanAssign == true) - { - Assign To... - } + Assign To... @if (accountEntry?.CanDisable == true && accountEntry is not IADComputer) { Change Password... diff --git a/BLAZAMGui/UI/Groups/AssignToModalContent.razor b/BLAZAMGui/UI/Groups/AssignToModalContent.razor index 0e7af1c4..b040a556 100644 --- a/BLAZAMGui/UI/Groups/AssignToModalContent.razor +++ b/BLAZAMGui/UI/Groups/AssignToModalContent.razor @@ -14,11 +14,12 @@ Label="Group Name" SearchObjectType="ActiveDirectoryObjectType.Group" @bind-SelectedResult=@Group - CustomResultsFilter=@((result)=>{ - if(result is IADGroup){ - return !DirectoryModel.MemberOf.Contains(result as IADGroup); + CustomDisabledFilter=@((result)=>{ + if(result is IADGroup group){ + return !DirectoryModel.MemberOf.Contains(group) && group.CanAssign ; } - return true; + return false + ; }) /> @if (count == 0) { diff --git a/BLAZAMGui/UI/Groups/MemberOfList.razor b/BLAZAMGui/UI/Groups/MemberOfList.razor index a41ba925..b14dfeee 100644 --- a/BLAZAMGui/UI/Groups/MemberOfList.razor +++ b/BLAZAMGui/UI/Groups/MemberOfList.razor @@ -15,7 +15,7 @@ - @if (EditMode) + @if (EditMode && g.CanUnassign) { @g.CanonicalName @@ -26,7 +26,7 @@ } - @if (EditMode) + @if (EditMode && g.CanUnassign) { } diff --git a/BLAZAMGui/UI/Inputs/ADAutoComplete.razor b/BLAZAMGui/UI/Inputs/ADAutoComplete.razor index 856bf818..c0772a51 100644 --- a/BLAZAMGui/UI/Inputs/ADAutoComplete.razor +++ b/BLAZAMGui/UI/Inputs/ADAutoComplete.razor @@ -1,4 +1,7 @@ @inherits AutoCompleteComponentBase +@{ +//TODO Finish custom disable +} CustomResultsFilter { get; set; } + + [Parameter] + public Func? CustomDisableFilter { get; set; } @* [Parameter] public IFluentDisplay Display { get; set; }*@ diff --git a/BLAZAMGui/UI/Inputs/ADAutoCompleteResult.razor b/BLAZAMGui/UI/Inputs/ADAutoCompleteResult.razor index 7d6edafd..1926564f 100644 --- a/BLAZAMGui/UI/Inputs/ADAutoCompleteResult.razor +++ b/BLAZAMGui/UI/Inputs/ADAutoCompleteResult.razor @@ -22,7 +22,7 @@ - + @@ -59,6 +59,9 @@ [Parameter] public IDirectoryEntryAdapter? Entry { get; set; } + [Parameter] + public bool Disabled { get; set; } = false; + private string typeIcon = Icons.Material.Filled.QuestionMark; protected override async Task OnInitializedAsync() diff --git a/BLAZAMGui/UI/Inputs/MudSelectList.razor b/BLAZAMGui/UI/Inputs/MudSelectList.razor index d9bf5daa..b9389ab0 100644 --- a/BLAZAMGui/UI/Inputs/MudSelectList.razor +++ b/BLAZAMGui/UI/Inputs/MudSelectList.razor @@ -42,6 +42,7 @@ @if (MultiSelection) { } @if (ToStringFunc != null) diff --git a/BLAZAMGui/UI/Outputs/NoAccess.razor b/BLAZAMGui/UI/Outputs/NoAccess.razor new file mode 100644 index 00000000..c2939602 --- /dev/null +++ b/BLAZAMGui/UI/Outputs/NoAccess.razor @@ -0,0 +1,10 @@ +@inject IStringLocalizer AppLocalization + + + @AppLocalization["You are missing permissions necessary to see this content"] + + + +@code { + +} diff --git a/BLAZAMServices/Background/ConnMonitor.cs b/BLAZAMServices/Background/ConnMonitor.cs index 978a9c72..c3962798 100644 --- a/BLAZAMServices/Background/ConnMonitor.cs +++ b/BLAZAMServices/Background/ConnMonitor.cs @@ -60,10 +60,8 @@ public ConnMonitor(IAppDatabaseFactory DbFactory, IActiveDirectoryContext direct DirectoryMonitor = new DirectoryMonitor(directory); DatabaseMonitor.OnConnectedChanged += (newStatus) => { - //TODO Separate Oops logic from razor page if (_encryption.Status == ServiceConnectionState.Down) { - //Oops.ErrorMessage = "EncryptionKey missing or invalid in appsettings.json"; AppReady = ServiceConnectionState.Down; return; } @@ -71,11 +69,7 @@ public ConnMonitor(IAppDatabaseFactory DbFactory, IActiveDirectoryContext direct { OnAppReadyChanged?.Invoke(newStatus); AppReady = newStatus; - if (newStatus == ServiceConnectionState.Down && DatabaseContextBase.DownReason != null) - { - // Oops.ErrorMessage = DatabaseContextBase.DownReason.GetType().FullName; - //Oops.HelpMessage = DatabaseContextBase.DownReason.Message; - } + } From 98e23596d4767c83776e5efcb354a75fcd389a17 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Sun, 18 Aug 2024 13:43:08 -0400 Subject: [PATCH 02/12] Fix for RootOU not being selected for OUTreeViews --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAMGui/Navs/Buttons/NavBrowseButton.razor | 3 +- BLAZAMGui/Navs/NavMenu.razor | 6 +- BLAZAMGui/UI/Inputs/ADAutoComplete.razor | 20 ++++-- .../UI/Inputs/TreeViews/OUTreeView.razor | 1 + .../UI/Inputs/TreeViews/OUTreeView.razor.cs | 18 +---- .../UI/Inputs/TreeViews/OUTreeViewBase.cs | 69 +++++++++++++------ .../NotificaionSubscriptionEditor.razor | 12 +++- 8 files changed, 81 insertions(+), 50 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 350c4aef..4dc5492e 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.17.2047 + 2024.08.18.1742 false BLAZAM False diff --git a/BLAZAMGui/Navs/Buttons/NavBrowseButton.razor b/BLAZAMGui/Navs/Buttons/NavBrowseButton.razor index a6ce0e4a..79e0245d 100644 --- a/BLAZAMGui/Navs/Buttons/NavBrowseButton.razor +++ b/BLAZAMGui/Navs/Buttons/NavBrowseButton.razor @@ -9,7 +9,8 @@ Title="@AppLocalization["Browse"]" Icon="@Icons.Material.Filled.ViewList"> {if(entry is IADOrganizationalUnit ou) return (ou.CanReadUsersInSubOus || ou.CanReadNonOUs); return false;}) - SelectedEntryChanged="@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);})" /> + SelectedEntryChanged="@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);})" + StartRootExpanded=false/> @code { diff --git a/BLAZAMGui/Navs/NavMenu.razor b/BLAZAMGui/Navs/NavMenu.razor index 2ecf26c9..28d80621 100644 --- a/BLAZAMGui/Navs/NavMenu.razor +++ b/BLAZAMGui/Navs/NavMenu.razor @@ -11,7 +11,6 @@ @@ -25,7 +24,8 @@ - {SelectedEntryChanged.InvokeAsync(entry);}) BrowseExpandedChanged=@((value)=>{BrowseExpandedChanged.InvokeAsync(value);}) /> + {SelectedEntryChanged.InvokeAsync(entry);}) + BrowseExpandedChanged=@((value)=>{BrowseExpandedChanged.InvokeAsync(value);}) /> - @code { -#nullable disable warnings +@code { + #nullable disable warnings [Parameter] public Func Validation { get; set; } [Parameter] @@ -83,8 +83,15 @@ [Parameter] public Origin AnchorOrigin { get; set; } = Origin.BottomCenter; + /// + /// Disables this autocomplete input + /// [Parameter] public bool Disabled { get; set; } + + /// + /// Automatically bring the text box into focus on load + /// [Parameter] public bool AutoFocus { get; set; } @@ -97,6 +104,7 @@ [Parameter] public int MaxResults { get; set; } = 10; + [Parameter] public bool AllowCustomInput { get; set; } @@ -115,6 +123,10 @@ IEnumerable _searchResults = new List(); bool _searchDisabled; + + /// + /// Indicates whether to search for disabled Users/Computers + /// [Parameter] public bool SearchDisabled { @@ -191,10 +203,10 @@ } - public List _selectedResults; + // public List _selectedResults; - List SelectedResultNames = new(); + // List SelectedResultNames = new(); diff --git a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor index 232fd114..715b85fd 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor +++ b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor @@ -11,6 +11,7 @@ @bind-SelectedValue="SelectedEntry"> ? EndAdornment { get; set; } - List> GetChildren(IDirectoryEntryAdapter context) - { - if (context is IADOrganizationalUnit ou) - { - return ou.TreeViewSubOUs.Where(o=>ShouldShowOU(o)).ToTreeItemData(); - } - return new List>(); - } - async Task>> GetChildrenAsync(IDirectoryEntryAdapter parentNode) - { - return await Task.Run(() => - { - return GetChildren(parentNode); - - - }); - } + diff --git a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs index 16cd1d16..8b55dd51 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs +++ b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs @@ -39,7 +39,7 @@ public IADOrganizationalUnit? StartingSelectedOU { if (value == _startingSelectedNode) return; _startingSelectedNode = value; - _selectedEntry = value; + SelectedEntry = value; StartingSelectedOUChanged.InvokeAsync(value); @@ -67,7 +67,7 @@ public IDirectoryEntryAdapter? SelectedEntry if (cache == null && RootOU.Count>0 && value == RootOU.First()) return; - SelectedEntryChanged.InvokeAsync(value); + InvokeAsync(() => { SelectedEntryChanged.InvokeAsync(value); }); //if (TopLevel == null) @@ -101,28 +101,29 @@ protected Color GetItemColor(IDirectoryEntryAdapter? item) } protected async Task InitializeTreeView() { - //Wait a few milliseconds to trip the async into acutally awaiting - await Task.Delay(500); + await Task.Run(() => { - //ApplicationBaseOUs = Directory.OUs.FindSubOusByDN(null); + //ApplicationBaseOUs = Directory.OUs.FindSubOusByDN(null); - if (RootOU is null || RootOU.Count < 1) - { - TopLevel = new ADOrganizationalUnit(); - TopLevel.Parse(directory: Directory, directoryEntry: Directory.GetDirectoryEntry()); - _ = TopLevel.SubOUs; - var TopLevelList = new List() { TopLevel }; - // RootOU = new HashSet() { TopLevel as IDirectoryEntryAdapter }; - RootOU = TopLevelList.ToTreeItemData(); - } - if (StartingSelectedOU == null) - { - StartingSelectedOU = TopLevel; + if (RootOU is null || RootOU.Count < 1) + { + TopLevel = new ADOrganizationalUnit(); + TopLevel.Parse(directory: Directory, directoryEntry: Directory.GetDirectoryEntry()); + _ = TopLevel.SubOUs; + var TopLevelList = new List() { TopLevel }; + // RootOU = new HashSet() { TopLevel as IDirectoryEntryAdapter }; + RootOU = TopLevelList.ToTreeItemData(); + } + if (StartingSelectedOU == null) + { + //StartingSelectedOU = TopLevel; - } + } + + OpenToSelected(); + }); - OpenToSelected(); LoadingData = false; await InvokeAsync(StateHasChanged); } @@ -149,9 +150,11 @@ protected override async Task OnInitializedAsync() protected void OpenToSelected() { - if (StartRootExpanded) + if (StartRootExpanded && RootOU!=null && RootOU.Count>0) { - if (!SelectedEntry.Equals(RootOU)) + RootOU.First().Expanded = true; + RootOU.First().Children = GetChildren(RootOU.First().Value); + if (StartingSelectedOU !=null && !StartingSelectedOU.Equals(RootOU.First().Value)) { var firstThing = RootOU.First(); if (firstThing.Value is IADOrganizationalUnit openThis) @@ -180,6 +183,11 @@ protected void OpenToSelected() } } } + else + { + RootOU.First().Selected = true; + SelectedEntry = RootOU.First().Value; + } } //InvokeAsync(StateHasChanged); @@ -206,5 +214,24 @@ protected bool ShouldShowOU(IDirectoryEntryAdapter entry) } return false; } + + + protected List> GetChildren(IDirectoryEntryAdapter context) + { + if (context is IADOrganizationalUnit ou) + { + return ou.TreeViewSubOUs.Where(o => ShouldShowOU(o)).ToTreeItemData(); + } + return new List>(); + } + protected async Task>> GetChildrenAsync(IDirectoryEntryAdapter parentNode) + { + return await Task.Run(() => + { + return GetChildren(parentNode); + + + }); + } } } diff --git a/BLAZAMGui/UI/Settings/Notifications/NotificaionSubscriptionEditor.razor b/BLAZAMGui/UI/Settings/Notifications/NotificaionSubscriptionEditor.razor index 8785e10c..5407130e 100644 --- a/BLAZAMGui/UI/Settings/Notifications/NotificaionSubscriptionEditor.razor +++ b/BLAZAMGui/UI/Settings/Notifications/NotificaionSubscriptionEditor.razor @@ -1,6 +1,8 @@ - + + @if (_selectedOU != null) @@ -14,12 +16,16 @@ -@code{ +@code { [Parameter] - public AppUser User {get;set;} + public AppUser User { get; set; } IDirectoryEntryAdapter? _selectedOU = null; + protected override Task OnInitializedAsync() + { + return base.OnInitializedAsync(); + } private async void ouChanged(IDirectoryEntryAdapter entry) { From d6f2aadf2ce28c657b4b5365cf42e14306be0fe7 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Sun, 18 Aug 2024 13:56:21 -0400 Subject: [PATCH 03/12] Fix for not being able to select item in permissions TreeView --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs | 2 +- BLAZAMGui/UI/Settings/Permissions/DelegateEditor.razor | 6 +----- BLAZAMGui/UI/Settings/Permissions/DelegateListItem.razor | 6 ++++-- BLAZAMGui/UI/Settings/Permissions/PermissionMapper.razor | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 4dc5492e..ea581971 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.18.1742 + 2024.08.18.1755 false BLAZAM False diff --git a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs index 8b55dd51..ff8a6fbf 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs +++ b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs @@ -154,7 +154,7 @@ protected void OpenToSelected() { RootOU.First().Expanded = true; RootOU.First().Children = GetChildren(RootOU.First().Value); - if (StartingSelectedOU !=null && !StartingSelectedOU.Equals(RootOU.First().Value)) + if (SelectedEntry !=null && !SelectedEntry.Equals(RootOU.First().Value)) { var firstThing = RootOU.First(); if (firstThing.Value is IADOrganizationalUnit openThis) diff --git a/BLAZAMGui/UI/Settings/Permissions/DelegateEditor.razor b/BLAZAMGui/UI/Settings/Permissions/DelegateEditor.razor index b9250548..83c6e169 100644 --- a/BLAZAMGui/UI/Settings/Permissions/DelegateEditor.razor +++ b/BLAZAMGui/UI/Settings/Permissions/DelegateEditor.razor @@ -17,11 +17,7 @@ @if (AllDelegates.Count > 0) { - var delegates = AllDelegates.Where(l => l.DeletedAt == null)@*.Where(l => - Directory.FindEntryBySID(l.DelegateSid).CanonicalName - .StartsWith(DelegateFilter, StringComparison.OrdinalIgnoreCase) || - Directory.FindEntryBySID(l.DelegateSid).CanonicalName - .Contains(DelegateFilter, StringComparison.OrdinalIgnoreCase))*@; + var delegates = AllDelegates.Where(l => l.DeletedAt == null); @foreach (var pl in delegates) { diff --git a/BLAZAMGui/UI/Settings/Permissions/DelegateListItem.razor b/BLAZAMGui/UI/Settings/Permissions/DelegateListItem.razor index 6254fa38..eb4ce7fe 100644 --- a/BLAZAMGui/UI/Settings/Permissions/DelegateListItem.razor +++ b/BLAZAMGui/UI/Settings/Permissions/DelegateListItem.razor @@ -39,11 +39,13 @@ + @* @AppLocalization["Show All Members"] *@ Save Changes + Color="Color.Success">@AppLocalization["Save Changes"] + Color="Color.Error" /> diff --git a/BLAZAMGui/UI/Settings/Permissions/PermissionMapper.razor b/BLAZAMGui/UI/Settings/Permissions/PermissionMapper.razor index 0f02ca4c..f6508fae 100644 --- a/BLAZAMGui/UI/Settings/Permissions/PermissionMapper.razor +++ b/BLAZAMGui/UI/Settings/Permissions/PermissionMapper.razor @@ -7,7 +7,7 @@ From 26c9515f302c3f75c27f9ea4a4aa9e5c3f8eaf48 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Sun, 18 Aug 2024 14:38:43 -0400 Subject: [PATCH 04/12] Missing group assignment behavior changes --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAM/Pages/Users/ViewUser.razor | 14 +++++++------- BLAZAMGui/UI/Groups/AssignToModalContent.razor | 2 +- BLAZAMGui/UI/Inputs/MudSelectList.razor | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index ea581971..2c245dcf 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.18.1755 + 2024.08.18.1836 false BLAZAM False diff --git a/BLAZAM/Pages/Users/ViewUser.razor b/BLAZAM/Pages/Users/ViewUser.razor index b55ab8d3..053ade01 100644 --- a/BLAZAM/Pages/Users/ViewUser.razor +++ b/BLAZAM/Pages/Users/ViewUser.razor @@ -170,13 +170,13 @@ @AppLocalization["Groups"] {AssignToModal?.ShowAsync();}) Model="User" /> - } - else - { - - } - - + + + } + else + { + + } diff --git a/BLAZAMGui/UI/Groups/AssignToModalContent.razor b/BLAZAMGui/UI/Groups/AssignToModalContent.razor index 9041a1a5..8796e624 100644 --- a/BLAZAMGui/UI/Groups/AssignToModalContent.razor +++ b/BLAZAMGui/UI/Groups/AssignToModalContent.razor @@ -14,7 +14,7 @@ Label="Group Name" SearchObjectType="ActiveDirectoryObjectType.Group" @bind-SelectedResult=@Group - CustomDisabledFilter=@((result)=>{ + CustomDisableFilter=@((result)=>{ if(result is IADGroup group){ return !DirectoryModel.MemberOf.Contains(group) && group.CanAssign ; } diff --git a/BLAZAMGui/UI/Inputs/MudSelectList.razor b/BLAZAMGui/UI/Inputs/MudSelectList.razor index ebc8f124..3a46dd1a 100644 --- a/BLAZAMGui/UI/Inputs/MudSelectList.razor +++ b/BLAZAMGui/UI/Inputs/MudSelectList.razor @@ -29,7 +29,7 @@ } - + From b87897257df322641bd582c4982b2df3e6e432cf Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Sun, 18 Aug 2024 14:52:53 -0400 Subject: [PATCH 05/12] Add disabled alert for users --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAM/Pages/Users/ViewUser.razor | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 2c245dcf..c6e88a19 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.18.1836 + 2024.08.18.1850 false BLAZAM False diff --git a/BLAZAM/Pages/Users/ViewUser.razor b/BLAZAM/Pages/Users/ViewUser.razor index 053ade01..1d7312a9 100644 --- a/BLAZAM/Pages/Users/ViewUser.razor +++ b/BLAZAM/Pages/Users/ViewUser.razor @@ -77,17 +77,18 @@ } - - + +
- + {showRemoveThumbnail=true;}) @onmouseleave=@(()=>{showRemoveThumbnail=false;})> + @if (User?.ThumbnailPhoto != null) { @@ -170,14 +171,17 @@ @AppLocalization["Groups"] {AssignToModal?.ShowAsync();}) Model="User" /> - + } else { - + + } + @if (User.Disabled) + { + @AppLocalization["User is disabled"] } - From edcc6f75ac7eb663d5e18b2816e8f4b5e88626b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:44:32 +0000 Subject: [PATCH 06/12] Bump System.Security.Permissions from 6.0.0 to 8.0.0 Bumps System.Security.Permissions from 6.0.0 to 8.0.0. --- updated-dependencies: - dependency-name: System.Security.Permissions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj | 1 + BLAZAMDatabase/BLAZAMDatabase.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj b/BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj index 379772f0..5eeb57ef 100644 --- a/BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj +++ b/BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj @@ -15,6 +15,7 @@ + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/BLAZAMDatabase/BLAZAMDatabase.csproj b/BLAZAMDatabase/BLAZAMDatabase.csproj index 015412fb..fb695b75 100644 --- a/BLAZAMDatabase/BLAZAMDatabase.csproj +++ b/BLAZAMDatabase/BLAZAMDatabase.csproj @@ -20,6 +20,7 @@ + From 3108c5d9877999c88bb32c8e00771b60734318dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:45:38 +0000 Subject: [PATCH 07/12] Bump Microsoft.Extensions.Configuration.Binder from 8.0.0 to 8.0.2 Bumps Microsoft.Extensions.Configuration.Binder from 8.0.0 to 8.0.2. --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration.Binder dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- BLAZAM/BLAZAM.csproj | 1 + BLAZAMCommon/BLAZAMCommon.csproj | 1 + BLAZAMLoggers/BLAZAMLogger.csproj | 1 + BlazamUpdate/BLAZAMUpdate.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index c6e88a19..c395e433 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -67,6 +67,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/BLAZAMCommon/BLAZAMCommon.csproj b/BLAZAMCommon/BLAZAMCommon.csproj index d07b4935..e71a47b1 100644 --- a/BLAZAMCommon/BLAZAMCommon.csproj +++ b/BLAZAMCommon/BLAZAMCommon.csproj @@ -29,6 +29,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/BLAZAMLoggers/BLAZAMLogger.csproj b/BLAZAMLoggers/BLAZAMLogger.csproj index 051e4500..68a6e4ac 100644 --- a/BLAZAMLoggers/BLAZAMLogger.csproj +++ b/BLAZAMLoggers/BLAZAMLogger.csproj @@ -8,6 +8,7 @@ + diff --git a/BlazamUpdate/BLAZAMUpdate.csproj b/BlazamUpdate/BLAZAMUpdate.csproj index dcd9b647..f0717749 100644 --- a/BlazamUpdate/BLAZAMUpdate.csproj +++ b/BlazamUpdate/BLAZAMUpdate.csproj @@ -8,6 +8,7 @@ + From 0b732437938be88c9400517e281d3c7c8bbf2fe0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:46:14 +0000 Subject: [PATCH 08/12] Bump Microsoft.Extensions.Localization.Abstractions from 8.0.6 to 8.0.8 Bumps Microsoft.Extensions.Localization.Abstractions from 8.0.6 to 8.0.8. --- updated-dependencies: - dependency-name: Microsoft.Extensions.Localization.Abstractions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- BLAZAMEmailMessage/BLAZAMEmailMessage.csproj | 1 + BLAZAMJobs/BLAZAMJobs.csproj | 1 + BLAZAMNotifications/BLAZAMNotifications.csproj | 1 + BLAZAMThemes/BLAZAMThemes.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/BLAZAMEmailMessage/BLAZAMEmailMessage.csproj b/BLAZAMEmailMessage/BLAZAMEmailMessage.csproj index fc0fc9e6..165c664b 100644 --- a/BLAZAMEmailMessage/BLAZAMEmailMessage.csproj +++ b/BLAZAMEmailMessage/BLAZAMEmailMessage.csproj @@ -14,6 +14,7 @@ + diff --git a/BLAZAMJobs/BLAZAMJobs.csproj b/BLAZAMJobs/BLAZAMJobs.csproj index f6fc644d..cf8cb6ee 100644 --- a/BLAZAMJobs/BLAZAMJobs.csproj +++ b/BLAZAMJobs/BLAZAMJobs.csproj @@ -8,6 +8,7 @@ + diff --git a/BLAZAMNotifications/BLAZAMNotifications.csproj b/BLAZAMNotifications/BLAZAMNotifications.csproj index 8c756e5e..6d86eb86 100644 --- a/BLAZAMNotifications/BLAZAMNotifications.csproj +++ b/BLAZAMNotifications/BLAZAMNotifications.csproj @@ -8,6 +8,7 @@ + diff --git a/BLAZAMThemes/BLAZAMThemes.csproj b/BLAZAMThemes/BLAZAMThemes.csproj index 0664ec01..5c2bb324 100644 --- a/BLAZAMThemes/BLAZAMThemes.csproj +++ b/BLAZAMThemes/BLAZAMThemes.csproj @@ -8,6 +8,7 @@ + From aa68f499cb81a6d5b4b4bb7a099ba7b98c12aab4 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Thu, 22 Aug 2024 19:19:47 -0400 Subject: [PATCH 09/12] Fix for OUTreeView failing after 3 layers deep #510 --- BLAZAM/BLAZAM.csproj | 2 +- .../UI/Inputs/TreeViews/ADTreeView.razor.cs | 8 +++---- .../UI/Inputs/TreeViews/OUTreeView.razor | 15 ++++++------ .../UI/Inputs/TreeViews/OUTreeViewBase.cs | 24 ++++++++++++++++++- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index c6e88a19..aba6fc98 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.18.1850 + 2024.08.22.2319 false BLAZAM False diff --git a/BLAZAMGui/UI/Inputs/TreeViews/ADTreeView.razor.cs b/BLAZAMGui/UI/Inputs/TreeViews/ADTreeView.razor.cs index d9d273f5..b10be6b5 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/ADTreeView.razor.cs +++ b/BLAZAMGui/UI/Inputs/TreeViews/ADTreeView.razor.cs @@ -58,22 +58,22 @@ protected async Task>> }); } - protected HashSet GetChildren(IDirectoryEntryAdapter parentNode) + protected IEnumerable GetChildren(IDirectoryEntryAdapter parentNode) { if (ShowAllEntries) { - var children = parentNode.Children.ToHashSet(); + var children = parentNode.Children; return children; } else if (parentNode is IADOrganizationalUnit ou) { - var children = ou.Children.Where(c => c.ObjectType == ActiveDirectoryObjectType.OU).ToHashSet(); + var children = ou.Children.Where(c => c.ObjectType == ActiveDirectoryObjectType.OU); return children; } - return new(); + return new List(); } diff --git a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor index 715b85fd..18dfe4a4 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor +++ b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeView.razor @@ -2,29 +2,30 @@ @Label - - + - + - + @if (RootOU == null || !RootOU.Any() || LoadingData) diff --git a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs index ff8a6fbf..4023a4d2 100644 --- a/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs +++ b/BLAZAMGui/UI/Inputs/TreeViews/OUTreeViewBase.cs @@ -99,7 +99,29 @@ protected Color GetItemColor(IDirectoryEntryAdapter? item) } return Color.Default; } - protected async Task InitializeTreeView() + + protected IReadOnlyCollection> GetItems(IDirectoryEntryAdapter? parent) + { + try + { + + var items = parent.Children + .Where(c => c.ObjectType == ActiveDirectoryObjectType.OU && ShouldShowOU(c)); + + + var treeBranchh = items.ToTreeItemData(); + return treeBranchh; + + } + catch (Exception) + { + return new List>(); + + } + + } + + protected async Task InitializeTreeView() { await Task.Run(() => { From 1c8313681af54f6c966896f5f0d85b613c81533e Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Thu, 22 Aug 2024 19:44:32 -0400 Subject: [PATCH 10/12] Incremnt build --- BLAZAM/BLAZAM.csproj | 2 +- BLAZAMUpdate/BLAZAMUpdate.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 18bce0d9..4438a387 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -6,7 +6,7 @@ enable false 1.0.0 - 2024.08.22.2319 + 2024.08.22.2343 false BLAZAM False diff --git a/BLAZAMUpdate/BLAZAMUpdate.csproj b/BLAZAMUpdate/BLAZAMUpdate.csproj index dcd9b647..f0717749 100644 --- a/BLAZAMUpdate/BLAZAMUpdate.csproj +++ b/BLAZAMUpdate/BLAZAMUpdate.csproj @@ -8,6 +8,7 @@ + From 68dfd2c413600d6c5fb07a246c050356aa22fe8b Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Thu, 22 Aug 2024 19:45:06 -0400 Subject: [PATCH 11/12] Increment version --- BLAZAM/BLAZAM.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 4438a387..a273c7a1 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -5,7 +5,7 @@ enable enable false - 1.0.0 + 1.0.1 2024.08.22.2343 false BLAZAM From 268332bb4ba625333e78a4265822237793254db7 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Thu, 22 Aug 2024 20:28:56 -0400 Subject: [PATCH 12/12] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 614df38c..6fad0c55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # BLAZAM +Proudly serving + +![image](https://github.com/user-attachments/assets/9b7a0006-b32f-4f4a-8cef-bf3ead418ba0) + ## Version 1.0.0 Release Notice Blazam has been officially released.