Skip to content

Commit

Permalink
Merge pull request #350 from Blazam-App/Beta-Nightly
Browse files Browse the repository at this point in the history
v0.9.2 update
  • Loading branch information
jacobsen9026 committed May 2, 2024
2 parents 7e4529a + ff60c5a commit 571c90c
Show file tree
Hide file tree
Showing 121 changed files with 12,888 additions and 1,231 deletions.
20 changes: 5 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,27 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
**To Reproduce (Required for complex issues)**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Environment (please complete the following information):**
- Blazam Version
- Running under IIS/Service

**Additional context**
Add any other context about the problem here.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 2 additions & 2 deletions BLAZAM.Tests/BLAZAM.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions BLAZAM.Tests/Updates/UpdateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ public async void Update_Returns_ValidDownload()
await latest.Download(null);

Assert.True(latest?.UpdateFile.Exists);
Update_Stages_OK(latest);
Update_Cleanup_OK(latest);
await Update_Stages_OK(latest);
await Update_Cleanup_OK(latest);
}
private async void Update_Stages_OK(ApplicationUpdate latest)
private async Task Update_Stages_OK(ApplicationUpdate latest)
{

await latest.ExtractFiles(null);
Assert.True(latest.UpdateStagingDirectory.Files.Count > 2);

}
private async void Update_Cleanup_OK(ApplicationUpdate latest)
private async Task Update_Cleanup_OK(ApplicationUpdate latest)
{

await latest.CleanStaging(null);
Expand Down
41 changes: 24 additions & 17 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>0.9.1</AssemblyVersion>
<Version>2024.04.13.2102</Version>
<AssemblyVersion>0.9.2</AssemblyVersion>
<Version>2024.05.01.2331</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand All @@ -26,6 +26,7 @@
<None Remove="static\img\default_logo2.png" />
<None Remove="static\img\default_logo3.png" />
<None Remove="static\img\default_logo4.png" />
<None Remove="static\img\default_logo5.png" />
</ItemGroup>


Expand Down Expand Up @@ -55,35 +56,35 @@
<ItemGroup>
<PackageReference Include="BlazorTemplater" Version="1.5.1" />
<PackageReference Include="Cassia" Version="2.0.0.60" />
<PackageReference Include="DuoUniversal" Version="1.2.2" />
<PackageReference Include="MailKit" Version="4.4.0" />
<PackageReference Include="DuoUniversal" Version="1.2.3" />
<PackageReference Include="MailKit" Version="4.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.28" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.28" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.28" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.28" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.17">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.29" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.29" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.29" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.29" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.18" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<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" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.16" />
<PackageReference Include="MudBlazor.Markdown" Version="0.1.3" />
<PackageReference Include="MudBlazor.ThemeManager" Version="1.0.9" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Octokit" Version="10.0.0" />
<PackageReference Include="Octokit" Version="11.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.1" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />

<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.0" />
Expand All @@ -108,6 +109,12 @@
<ProjectReference Include="..\BlazamUpdate\BLAZAMUpdate.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="static\img\default_logo5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
Expand Down
8 changes: 8 additions & 0 deletions BLAZAM/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:BLAZAM.Server.ProgramHelpers.GetInstallationId~System.Guid")]
19 changes: 11 additions & 8 deletions BLAZAM/Pages/Groups/CreateGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


<OUTreeView Label="Parent Organizational Unit"
SelectedOUChanged="OUSelected">
SelectedEntryChanged="OUSelected">
@* <NodeContent>
@context.Name
</NodeContent>*@
Expand Down Expand Up @@ -73,7 +73,7 @@

int selectedStep;





Expand All @@ -89,17 +89,20 @@
templates = await Context?.DirectoryTemplates.ToListAsync();
await InvokeAsync(StateHasChanged);
}
async void OUSelected(IADOrganizationalUnit ou)
async void OUSelected(IDirectoryEntryAdapter entry)
{
if (parentOU == null)
if (entry is IADOrganizationalUnit ou)
{
if (parentOU == null)
{
parentOU = ou;
return;
}
parentOU = ou;
return;
}
parentOU = ou;


await InvokeAsync(StateHasChanged);
await InvokeAsync(StateHasChanged);
}
}

async void CreateNewGroup()
Expand Down
9 changes: 1 addition & 8 deletions BLAZAM/Pages/Home.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@

@if (ApplicationInfo.InDebugMode)
{
<MudContextMenu Text="Test Context Menu">
<MenuContents>

<MudMenuItem>Test Item</MudMenuItem>
<MudMenuItem>Test Item</MudMenuItem>
<MudMenuItem>Test Item</MudMenuItem>
</MenuContents>
</MudContextMenu><br/>

<MudButton Variant="Variant.Filled" OnClick="testJob">Run Test Job</MudButton>
}

Expand Down
2 changes: 1 addition & 1 deletion BLAZAM/Pages/Install/InstallDatabase.razor
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ else
await InvokeAsync(StateHasChanged);
try
{
if (await DbFactory.ApplyDatabaseMigrations(true))
if (await DbFactory.ApplyDatabaseMigrationsAsync(true))
{
Completed = true;
await InvokeAsync(StepCompleted.InvokeAsync);
Expand Down
18 changes: 11 additions & 7 deletions BLAZAM/Pages/OU/CreateOU.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


<OUTreeView Label="Parent Organizational Unit"
SelectedOUChanged="OUSelected">
SelectedEntryChanged="OUSelected">
@* <NodeContent>
@context.Name
</NodeContent>*@
Expand Down Expand Up @@ -84,19 +84,23 @@
return false;
}
*/
async void OUSelected(IADOrganizationalUnit ou)
async void OUSelected(IDirectoryEntryAdapter entry)
{
if (parentOU == null)
if (entry is IADOrganizationalUnit ou)
{
if (parentOU == null)
{
parentOU = ou;
return;
}
parentOU = ou;
return;
}
parentOU = ou;


await InvokeAsync(StateHasChanged);
await InvokeAsync(StateHasChanged);
}
}


async void CreateNewOU()
{
LoadingData = true;
Expand Down
36 changes: 26 additions & 10 deletions BLAZAM/Pages/Users/CreateUser.razor
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,18 @@
@AppLocalization["OU"]
</TabContent>
<ChildContent>
<OUTreeView SelectedOUChanged="OUSelected" />
@* <ADTreeView ShowAllEntries=false SelectedEntryChanged="OUSelected"/> *@
<OUTreeView AdditionalVisibilityFilters=@(AdditionalShow) StartRootExpanded=true SelectedEntryChanged="OUSelected" />

<MudTextField Label="@AppLocalization["Display Name"]" @bind-Value="@customUserDisplayName" />



<MudButton Color=Color.Primary OnClick="@(()=>{SelectedStep=0;})">Back</MudButton>
<MudButton Disabled=@(customUserDisplayName.IsNullOrEmpty()&& selectedOU!=null) Color=Color.Success OnClick="@(async()=>{await CreateCustomUser();selectedStep=5;})">Next</MudButton>
<MudButton Disabled=@(customUserDisplayName.IsNullOrEmpty()|| selectedOU==null) Color=Color.Success OnClick="@(async()=>{
await CreateCustomUser();
selectedStep=5;
})">Next</MudButton>


</ChildContent>
Expand Down Expand Up @@ -214,15 +218,17 @@ newUser?.StagePasswordChange(customConfirmPassword.ToSecureString());
await InvokeAsync(StateHasChanged);
}

async void OUSelected(IADOrganizationalUnit ou)
async void OUSelected(IDirectoryEntryAdapter entry)
{
if (selectedOU == null)
if (entry is IADOrganizationalUnit ou)
{
selectedOU = ou;
return;
if(ou.CanCreateUser)
selectedOU = ou;
else
{
SnackBarService.Warning(AppLocalization["You do not have permission to create users in that location"]);
}
}
selectedOU = ou;


await InvokeAsync(StateHasChanged);
}
Expand Down Expand Up @@ -264,7 +270,9 @@ newUser?.StagePasswordChange(customConfirmPassword.ToSecureString());
newUser.DisplayName = SelectedTemplate.GenerateDisplayName(newUserName);
//newUser.SetPassword(SelectedTemplate.GeneratePassword().ToSecureString(),false);
//newUser.CanonicalName = SelectedTemplate.GenerateDisplayName(newUserName);
newUser.StagePasswordChange(SelectedTemplate.GeneratePassword().ToSecureString(), true);
newUser.StagePasswordChange(SelectedTemplate.GeneratePassword().ToSecureString());
if (SelectedTemplate.EffectiveRequirePasswordChange == true)
newUser.StageRequirePasswordChange(true);
if (!newUserName.GivenName.IsNullOrEmpty())
newUser.GivenName = newUserName.GivenName;
if (!newUserName.MiddleName.IsNullOrEmpty())
Expand Down Expand Up @@ -334,5 +342,13 @@ newUser?.StagePasswordChange(customConfirmPassword.ToSecureString());
SelectedStep = 1;
await InvokeAsync(StateHasChanged);
}

bool AdditionalShow(IDirectoryEntryAdapter entry)
{
if(entry is IADOrganizationalUnit ou)
{
if (ou.CanCreateUser) return true;
if (ou.CanCreateUserInSubOUs) return true;
}
return false;
}
}
4 changes: 2 additions & 2 deletions BLAZAM/Pages/Users/ViewUser.razor
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
@bind-Value="@ConfirmPassword"
InputType="InputType.Password" />
}


<MudStack Row=true Spacing="0">
<DynamicMudInput T=string Label="@AppLocalization["Email Address"]"
Expand Down Expand Up @@ -378,7 +378,7 @@
}
@if (User.CanReadField(ActiveDirectoryFields.HomeDrive))
{
<HomeDriveSelect Label="@AppLocalization["Home Drive"]" @bind-Value="@User.HomeDrive" Disabled=@(!EditMode || !User.CanEditField(ActiveDirectoryFields.HomeDrive)) />
<HomeDriveSelect Label="@AppLocalization["Home Drive"]" @bind-DriveLetter="@User.HomeDrive" Disabled=@(!EditMode || !User.CanEditField(ActiveDirectoryFields.HomeDrive)) />
}
@if (User.CanReadField(ActiveDirectoryFields.ScriptPath))
{
Expand Down
2 changes: 1 addition & 1 deletion BLAZAM/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
@if (!!ApplicationInfo.InDemoMode && !ApplicationInfo.InDebugMode && !Debugger.IsAttached)
@if (!!ApplicationInfo.InDemoMode && !ApplicationInfo.InDebugMode && !Debugger.IsAttached && DatabaseCache.ApplicationSettings?.SendDeveloperAnalytics == true)
{
<!-- BLAZAM Dev Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-415DR9ZVBH"></script>
Expand Down

0 comments on commit 571c90c

Please sign in to comment.