Skip to content
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

V1 nightly #513

Merged
merged 20 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5f2c767
Foundation for group assignment behavior change
jacobsen9026 Jul 10, 2024
98e2359
Fix for RootOU not being selected for OUTreeViews
jacobsen9026 Aug 18, 2024
d6f2aad
Fix for not being able to select item in permissions TreeView
jacobsen9026 Aug 18, 2024
b431aa8
Merge pull request #503 from Blazam-App/493-select-dropdown-does-not-…
jacobsen9026 Aug 18, 2024
285979e
Merge branch 'v1-Dev' into Group-Assignments
jacobsen9026 Aug 18, 2024
ed19170
Merge pull request #504 from Blazam-App/Group-Assignments
jacobsen9026 Aug 18, 2024
26c9515
Missing group assignment behavior changes
jacobsen9026 Aug 18, 2024
b878972
Add disabled alert for users
jacobsen9026 Aug 18, 2024
edcc6f7
Bump System.Security.Permissions from 6.0.0 to 8.0.0
dependabot[bot] Aug 19, 2024
3108c5d
Bump Microsoft.Extensions.Configuration.Binder from 8.0.0 to 8.0.2
dependabot[bot] Aug 19, 2024
0b73243
Bump Microsoft.Extensions.Localization.Abstractions from 8.0.6 to 8.0.8
dependabot[bot] Aug 19, 2024
aa68f49
Fix for OUTreeView failing after 3 layers deep #510
jacobsen9026 Aug 22, 2024
1194065
Merge pull request #509 from Blazam-App/dependabot/nuget/Microsoft.Ex…
jacobsen9026 Aug 22, 2024
2aea4da
Merge pull request #508 from Blazam-App/dependabot/nuget/Microsoft.Ex…
jacobsen9026 Aug 22, 2024
0ddec76
Merge pull request #507 from Blazam-App/dependabot/nuget/System.Secur…
jacobsen9026 Aug 22, 2024
1c83136
Incremnt build
jacobsen9026 Aug 22, 2024
68dfd2c
Increment version
jacobsen9026 Aug 22, 2024
b316f4e
Merge pull request #511 from Blazam-App/v1-Dev
jacobsen9026 Aug 22, 2024
268332b
Update README.md
jacobsen9026 Aug 23, 2024
02bf00e
Merge pull request #512 from Blazam-App/v1-Dev
jacobsen9026 Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Version>2024.08.17.2047</Version>
<AssemblyVersion>1.0.1</AssemblyVersion>
<Version>2024.08.22.2343</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down Expand Up @@ -67,6 +67,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
Expand Down
15 changes: 10 additions & 5 deletions BLAZAM/Pages/Groups/ViewGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,17 @@

</Section>
</MudItem>
<MudItem xs="12" md="12">
<Section Style="min-height:200px;" Title=@AppLocalization["Members"]>
<GroupMembersDataGrid Group="Group" />

</Section>
</MudItem>

@if (Group.CanReadField(ActiveDirectoryFields.MemberOf))
{
<MudItem xs="12" md="12">
<Section Style="min-height:200px;" Title=@AppLocalization["Members"]>
<GroupMembersDataGrid Group="Group" />

</Section>
</MudItem>
}
</MudGrid>


Expand Down
21 changes: 15 additions & 6 deletions BLAZAM/Pages/Users/ViewUser.razor
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,18 @@
<LogonHoursModalContent User="User" />
}
</AppModal>



<MudGrid>
<MudItem xs="12" md="3">

<Section FullWidth=false>

<MudCard Elevation="2"
Style="width:fit-content;height:fit-content"
Class="relative mx-auto my-auto d-block p-1"
@onmouseenter=@(()=>{showRemoveThumbnail=true;})
@onmouseleave=@(()=>{showRemoveThumbnail=false;})>

@if (User?.ThumbnailPhoto != null)
{
<Base64Image Style="max-height:150px;max-width:150px;" Data="User.ThumbnailPhoto.ReizeRawImage(150)" />
Expand Down Expand Up @@ -163,17 +164,25 @@




@if (User.CanReadField(ActiveDirectoryFields.MemberOf))
{
<MudStack>
<MudText Typo="Typo.subtitle2">@AppLocalization["Groups"]</MudText>
<MemberOfList AssignToClicked=@(()=>{AssignToModal?.ShowAsync();}) Model="User" />

</MudStack>



</MudStack>
}
else
{
<NoAccess />
}
@if (User.Disabled)
{
<MudAlert Severity="Severity.Error" Class="mud-width-full">@AppLocalization["User is disabled"]</MudAlert>
}



</Section>
Expand Down
1 change: 1 addition & 0 deletions BLAZAMCommon.Tests/BLAZAMCommon.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
1 change: 1 addition & 0 deletions BLAZAMCommon/BLAZAMCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
Expand Down
1 change: 1 addition & 0 deletions BLAZAMDatabase/BLAZAMDatabase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageReference Include="System.Data.SQLite" Version="1.0.118" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions BLAZAMEmailMessage/BLAZAMEmailMessage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.8" />
<PackageReference Include="MudBlazor" Version="7.6.0" />
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion BLAZAMGui/Navs/Buttons/NavBrowseButton.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
Title="@AppLocalization["Browse"]"
Icon="@Icons.Material.Filled.ViewList">
<ADTreeView AdditionalVisibilityFilters=@((entry)=>{if(entry is IADOrganizationalUnit ou) return (ou.CanReadUsersInSubOus || ou.CanReadNonOUs); return false;})
SelectedEntryChanged="@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);})" />
SelectedEntryChanged="@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);})"
StartRootExpanded=false/>
</MudNavGroup>

@code {
Expand Down
6 changes: 3 additions & 3 deletions BLAZAMGui/Navs/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<MudNavMenu Color="Color.Success"
Bordered="true"

Class="py-3 w-100">
<MudBreakpointProvider>
<MudHidden Breakpoint="Breakpoint.MdAndUp">
Expand All @@ -25,7 +24,8 @@
</MudHidden>
</MudBreakpointProvider>
<NavHomeButton />
<NavBrowseButton SelectedEntryChanged=@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);}) BrowseExpandedChanged=@((value)=>{BrowseExpandedChanged.InvokeAsync(value);}) />
<NavBrowseButton SelectedEntryChanged=@((entry)=>{SelectedEntryChanged.InvokeAsync(entry);})
BrowseExpandedChanged=@((value)=>{BrowseExpandedChanged.InvokeAsync(value);}) />
<AuthorizeView Context="createContext" Roles=@createRole>
<MudNavGroup Icon="@Icons.Material.Filled.Create"
Title="@AppLocalization["Create"]"
Expand Down Expand Up @@ -88,7 +88,7 @@

public void GotoEntry(IDirectoryEntryAdapter entry)
{

Nav.NavigateTo(entry.SearchUri);
}

Expand Down
10 changes: 4 additions & 6 deletions BLAZAMGui/UI/DirectoryEntryViewHeader.razor
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
Icon="@Icons.Material.Filled.Edit"
ToggledIcon="@Icons.Material.Filled.EditOff"
ToggledColor="Color.Error"
Disabled=@(!DirectoryEntry.CanEdit && !CurrentUser.State.CanAssign) />
Disabled=@(!DirectoryEntry.CanEdit && (accountEntry!=null && (accountEntry.CanAssign||accountEntry.CanUnassign)))
ToggledTitle="End Edit" />

</MudTooltip>

@if (accountEntry != null && accountEntry.LockedOut)
Expand All @@ -87,7 +89,6 @@
<MudTooltip Text="@AppLocalization["Assign To"]">

<MudIconButton OnClick="@Assign"
Disabled=@(!groupableEntry.CanAssign)
Icon="@Icons.Material.Filled.GroupAdd"
aria-label="assign to" />
</MudTooltip>
Expand Down Expand Up @@ -172,10 +173,7 @@
{
<MudMenuItem OnClick="@Unlock">Unlock...</MudMenuItem>
}
@if (groupableEntry?.CanAssign == true)
{
<MudMenuItem OnClick="@Assign">Assign To...</MudMenuItem>
}
<MudMenuItem OnClick="@Assign">Assign To...</MudMenuItem>
@if (accountEntry?.CanDisable == true && accountEntry is not IADComputer)
{
<MudMenuItem OnClick="@ResetPassword">Change Password...</MudMenuItem>
Expand Down
9 changes: 5 additions & 4 deletions BLAZAMGui/UI/Groups/AssignToModalContent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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);
CustomDisableFilter=@((result)=>{
if(result is IADGroup group){
return !DirectoryModel.MemberOf.Contains(group) && group.CanAssign ;
}
return true;
return false
;
}) />
@if (count == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions BLAZAMGui/UI/Groups/MemberOfList.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<MudListItem>
<ChildContent>
<MudStack Row=true>
@if (EditMode)
@if (EditMode && g.CanUnassign)
{
<MudText Class="align-middle">@g.CanonicalName</MudText>

Expand All @@ -25,7 +25,7 @@

}
<MudSpacer />
@if (EditMode)
@if (EditMode && g.CanUnassign)
{
<MudIconButton Size="Size.Small" OnClick="@(()=>{Model.UnassignFrom(g);})" Class="align-end align-middle" Color=Color.Error Icon="@Icons.Material.Filled.Close" />
}
Expand Down
26 changes: 22 additions & 4 deletions BLAZAMGui/UI/Inputs/ADAutoComplete.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@inherits AutoCompleteComponentBase
@{
//TODO Finish custom disable
}
<MudAutocomplete Class="@Class"
Style="@Style"
Disabled=@Disabled
Expand Down Expand Up @@ -63,8 +66,8 @@
</MoreItemsTemplate>
</MudAutocomplete>

@code {
#nullable disable warnings
@code {
#nullable disable warnings
[Parameter]
public Func<object> Validation { get; set; }
[Parameter]
Expand All @@ -83,8 +86,15 @@
[Parameter]
public Origin AnchorOrigin { get; set; } = Origin.BottomCenter;

/// <summary>
/// Disables this autocomplete input
/// </summary>
[Parameter]
public bool Disabled { get; set; }

/// <summary>
/// Automatically bring the text box into focus on load
/// </summary>
[Parameter]
public bool AutoFocus { get; set; }

Expand All @@ -97,6 +107,7 @@
[Parameter]
public int MaxResults { get; set; } = 10;


[Parameter]
public bool AllowCustomInput { get; set; }

Expand All @@ -106,6 +117,9 @@

[Parameter]
public Func<IDirectoryEntryAdapter, bool> CustomResultsFilter { get; set; }

[Parameter]
public Func<IDirectoryEntryAdapter, bool>? CustomDisableFilter { get; set; }
@*
[Parameter]
public IFluentDisplay Display { get; set; }*@
Expand All @@ -115,6 +129,10 @@

IEnumerable<IDirectoryEntryAdapter> _searchResults = new List<IDirectoryEntryAdapter>();
bool _searchDisabled;

/// <summary>
/// Indicates whether to search for disabled Users/Computers
/// </summary>
[Parameter]
public bool SearchDisabled
{
Expand Down Expand Up @@ -191,10 +209,10 @@
}


public List<IDirectoryEntryAdapter> _selectedResults;
// public List<IDirectoryEntryAdapter> _selectedResults;


List<string> SelectedResultNames = new();
// List<string> SelectedResultNames = new();



Expand Down
5 changes: 4 additions & 1 deletion BLAZAMGui/UI/Inputs/ADAutoCompleteResult.razor
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<MudIcon Icon="@typeIcon"/>

</MudItem>
<MudItem sm="12" md="10">
<MudItem sm="12" md="10">
<MudStack Row=true Spacing="0">
<MudStack Spacing="0">
<MudText Typo="Typo.subtitle2">
Expand Down Expand Up @@ -67,6 +67,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()
Expand Down
Loading
Loading