Skip to content

Commit

Permalink
Merge pull request #647 from Blazam-App/v1-Nightly
Browse files Browse the repository at this point in the history
V1.1.0 Update
  • Loading branch information
jacobsen9026 authored Nov 13, 2024
2 parents 29cd2fd + 2ff41d1 commit 85f5f08
Show file tree
Hide file tree
Showing 133 changed files with 16,028 additions and 1,229 deletions.
142 changes: 142 additions & 0 deletions BLAZAM/BLAZAM - Backup.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.0.7</AssemblyVersion>
<Version>2024.11.02.0114</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>

</PropertyGroup>

<ItemGroup>
<Compile Remove="Exceptions\**" />
<Content Remove="Exceptions\**" />
<EmbeddedResource Remove="Exceptions\**" />
<None Remove="Exceptions\**" />
</ItemGroup>

<ItemGroup>
<None Remove="nssm.exe" />
<None Remove="static\img\default_logo.png" />
<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>







<ItemGroup>
<Content Include="nssm.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="static\img\default_logo4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="BlazorTemplater" Version="1.5.1" />
<PackageReference Include="Cassia" Version="2.0.0.60" />
<PackageReference Include="DuoUniversal" Version="1.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<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.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.6" />
<PackageReference Include="MudBlazor" Version="7.11.0" />
<PackageReference Include="MudBlazor.Markdown" Version="7.8.0" />
<PackageReference Include="MudBlazor.ThemeManager" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />

<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BLAZAMActiveDirectory\BLAZAMActiveDirectory.csproj" />
<ProjectReference Include="..\BLAZAMCommon\BLAZAMCommon.csproj" />
<ProjectReference Include="..\BLAZAMDatabase\BLAZAMDatabase.csproj" />
<ProjectReference Include="..\BLAZAMEmailMessage\BLAZAMEmailMessage.csproj" />
<ProjectReference Include="..\BLAZAMFileSystem\BLAZAMFileSystem.csproj" />
<ProjectReference Include="..\BLAZAMGui\BLAZAMGui.csproj" />
<ProjectReference Include="..\BLAZAMJobs\BLAZAMJobs.csproj" />
<ProjectReference Include="..\BLAZAMLocalization\BLAZAMLocalization.csproj" />
<ProjectReference Include="..\BLAZAMLoggers\BLAZAMLogger.csproj" />
<ProjectReference Include="..\BLAZAMNav\BLAZAMNav.csproj" />
<ProjectReference Include="..\BLAZAMNotifications\BLAZAMNotifications.csproj" />
<ProjectReference Include="..\BLAZAMServices\BLAZAMServices.csproj" />
<ProjectReference Include="..\BLAZAMSession\BLAZAMSession.csproj" />
<ProjectReference Include="..\BLAZAMStatic\BLAZAMStatic.csproj" />
<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>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\favicon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="license.rtf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="updater\update.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Condition="'$(Configuration)' == 'Debug'" Command="powershell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\IncrementBuildNumber.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>

8 changes: 6 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.7</AssemblyVersion>
<Version>2024.10.31.0016</Version>
<AssemblyVersion>1.1.0</AssemblyVersion>
<Version>2024.11.13.2234</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down Expand Up @@ -58,6 +58,10 @@
<PackageReference Include="Cassia" Version="2.0.0.60" />
<PackageReference Include="DuoUniversal" Version="1.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<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.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
Expand Down
4 changes: 1 addition & 3 deletions BLAZAM/Pages/Computers/ViewBitLocker.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@


<BitLockerViewer Computer="_computer"/>
<MudOverlay Visible="LoadingData" DarkBackground="true" Absolute="true">
<MudProgressCircular Color="Color.Secondary" Indeterminate="true" />
</MudOverlay>
<LoadingData Loading=LoadingData />



Expand Down
12 changes: 4 additions & 8 deletions BLAZAM/Pages/Computers/ViewComputer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
OnUnlock="@Unlock"
OnShowHistory="@(()=>{ChangeHistoryModal?.ShowAsync();})"
OnShowPermissions="@(()=>{EffectivePermissionsModal?.ShowAsync();})" />
<MudOverlay Visible="SavingChanges" DarkBackground="false" Absolute="true">

</MudOverlay>
<LoadingData Loading=SavingChanges />


</SetSubHeader>
Expand Down Expand Up @@ -231,9 +229,7 @@
<UnsavedChangesPrompt SaveChanges="SaveChanges" DiscardChanges="DiscardChanges" />
}
}
<MudOverlay Visible="SavingChanges" DarkBackground="true" Absolute="true">
<MudProgressCircular Color="Color.Secondary" Indeterminate="true" />
</MudOverlay>
<LoadingData Loading=SavingChanges />



Expand Down Expand Up @@ -292,7 +288,7 @@
Computer.Delete();
SnackBarService.Success(Computer.CanonicalName + " has been deleted.");
await AuditLogger.Computer.Deleted(Computer);
_ = OUNotificationService.PostAsync(Computer, NotificationType.Delete);
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Delete, CurrentUser.State);

Nav.NavigateTo("/users/search");

Expand Down Expand Up @@ -332,7 +328,7 @@
}
if (changes.Any(c => c.Field != ActiveDirectoryFields.MemberOf.FieldName))
{
_ = OUNotificationService.PostAsync(Computer, NotificationType.Modify);
_ = NotificationGenerationService.PostAsync(Computer, NotificationType.Modify, CurrentUser.State);
await AuditLogger.User.Changed(Computer, changes.Where(c => c.Field != ActiveDirectoryFields.MemberOf.FieldName).ToList());
}

Expand Down
4 changes: 2 additions & 2 deletions BLAZAM/Pages/Configure/Audit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@



<AppPageTitle>Audit</AppPageTitle>
<h3>Audit</h3>
<AppPageTitle>@AppLocalization["Audit"]</AppPageTitle>
<MudText Typo="Typo.h4">@AppLocalization["Audit"]</MudText>



Expand Down
7 changes: 4 additions & 3 deletions BLAZAM/Pages/Configure/Fields.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
@inherits DatabaseComponentBase
@attribute [Authorize(Roles = UserRoles.SuperAdmin)]

<AppPageTitle>@AppLocalization["Fields"]</AppPageTitle>

<MudText Typo="Typo.h4">@AppLocalization["Fields"] <AppDocumentationButton Page="/admin/fields" /></MudText>
<MudDataGrid @ref=fieldGrid
T="CustomActiveDirectoryField"
ServerData="RefreshData"
Expand All @@ -11,10 +14,8 @@
FixedHeader=true
EditTrigger="DataGridEditTrigger.Manual">
<ToolBarContent>
<MudText Typo="Typo.h6">@AppLocalization["Fields"]</MudText>
<MudSpacer />
<MudIconButton Icon="@Icons.Material.Filled.Add" OnClick="@(()=>{addFieldModal?.ShowAsync();})" />
<AppDocumentationButton Page="/admin/fields" />
<MudIconButton Icon="@Icons.Material.Filled.Add" Color=@Color.Success OnClick="@(()=>{addFieldModal?.ShowAsync();})" />

</ToolBarContent>

Expand Down
20 changes: 18 additions & 2 deletions BLAZAM/Pages/Configure/Permissions.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
@attribute [Authorize(Roles = UserRoles.SuperAdmin)]

@inherits TabbedAppComponentBase
<AppPageTitle>@AppLocalization["Permissions"]</AppPageTitle>

<AppPageTitle>Permissions</AppPageTitle>
<AuthorizeView Roles=@UserRoles.SuperAdmin>

<SetHeader>
Expand Down Expand Up @@ -48,7 +48,7 @@

@if (Monitor.DirectoryConnectionStatus == ServiceConnectionState.Up)
{
<ImpersonateUser />

<PermissionMapper />

}
Expand Down Expand Up @@ -76,6 +76,22 @@
</TabContent>

</MudTabPanel>
<MudTabPanel>
<ChildContent>

@if (Monitor.DirectoryConnectionStatus == ServiceConnectionState.Up)
{
<GlobalPermissions />

}


</ChildContent>
<TabContent>
@AppLocalization["Global Settings"]
</TabContent>

</MudTabPanel>
</MudTabs>


Expand Down
2 changes: 1 addition & 1 deletion BLAZAM/Pages/Configure/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
@attribute [Authorize(Roles = UserRoles.SuperAdmin)]

@inherits TabbedAppComponentBase
<AppPageTitle>@AppLocalization["Settings"]</AppPageTitle>

<AppPageTitle>Settings</AppPageTitle>
<SetHeader>
</SetHeader>
<AuthorizeView>
Expand Down
2 changes: 2 additions & 0 deletions BLAZAM/Pages/Configure/Templates.razor
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@

</AppModal>
</SetHeader>

<MudText Typo="Typo.h4">@AppLocalization["Templates"] <AppDocumentationButton Page="/admin/templates" /></MudText>
@if (Templates.Count() > 0)
{

Expand Down
3 changes: 3 additions & 0 deletions BLAZAM/Pages/Error/UnhandledExceptionPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
</MudPaper>
</MudCard>
}
else
{
<MudText Class="my-7">To see error details, set DebugMode to true in appsettings.json in the Blazam installation directory.</MudText>
}

}
catch (Exception ex)
Expand Down
4 changes: 2 additions & 2 deletions BLAZAM/Pages/Groups/ConfirmNewGroup.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@inherits AppComponentBase
@inject OUNotificationService OUNotificationService
@inject NotificationGenerationService OUNotificationService

<AppPageTitle>Confirm Group Creation</AppPageTitle>

Expand Down Expand Up @@ -43,7 +43,7 @@

}
await AuditLogger.Group.Created(Group);
_ = OUNotificationService.PostAsync(Group, NotificationType.Create);
_ = OUNotificationService.PostAsync(Group, NotificationType.Create,CurrentUser.State);

var commitJob = Group.CommitChanges();
await Confirmed.InvokeAsync(Group);
Expand Down
10 changes: 5 additions & 5 deletions BLAZAM/Pages/Groups/ViewGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
OnShowHistory="@(()=>{ChangeHistoryModal?.ShowAsync();})"
OnShowPermissions="@(()=>{EffectivePermissionsModal?.ShowAsync();})"
OnToggleEditMode="@ToggleEditMode" />
<MudOverlay Visible="SavingChanges" DarkBackground="false" Absolute="true" />
<LoadingData Loading=SavingChanges />
</SetSubHeader>

<CascadingValue Value="EditMode">
Expand Down Expand Up @@ -161,20 +161,20 @@
{
await AuditLogger.User.Assigned(assignment.Member, assignment.Group);
await AuditLogger.Group.MemberAdded(assignment.Group, assignment.Member);
_ = OUNotificationService.PostAsync(assignment.Member, NotificationType.GroupAssignment, target: Group);
_ = NotificationGenerationService.PostAsync(assignment.Member, NotificationType.GroupAssignment, CurrentUser.State, Group);

}

foreach (var assignment in unassignFrom)
{
await AuditLogger.User.Unassigned(assignment.Member, assignment.Group);
await AuditLogger.Group.MemberRemoved(assignment.Group, assignment.Member);
_ = OUNotificationService.PostAsync(assignment.Member, NotificationType.GroupAssignment, target: Group);
_ = NotificationGenerationService.PostAsync(assignment.Member, NotificationType.GroupAssignment, CurrentUser.State, Group);

}
if (changes.Any(c => c.Field != "member"))
{
_ = OUNotificationService.PostAsync(Group, NotificationType.Modify);
_ = NotificationGenerationService.PostAsync(Group, NotificationType.Modify, CurrentUser.State);
await AuditLogger.Group.Changed(Group, changes.Where(c => c.Field != ActiveDirectoryFields.MemberOf.FieldName).ToList());
}
//await AuditLogger.Group.Changed(Group, Group.Changes);
Expand Down Expand Up @@ -205,7 +205,7 @@
Group.Delete();
SnackBarService.Success(Group.CanonicalName + " has been deleted.");
await AuditLogger.Group.Deleted(Group);
_ = OUNotificationService.PostAsync(Group, NotificationType.Delete);
_ = NotificationGenerationService.PostAsync(Group, NotificationType.Delete, CurrentUser.State);

//Group = null;
Nav.NavigateTo("/groups/search");
Expand Down
6 changes: 1 addition & 5 deletions BLAZAM/Pages/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@

</MudContainer>

<MudOverlay Visible="attemptingSignIn"
DarkBackground="true"
Absolute="true">
@*<MudProgressCircular Color="Color.Secondary" Indeterminate="true" />*@
</MudOverlay>
<LoadingData Loading=attemptingSignIn />
</form>
<MudElement Class="d-flex mud-width-full justify-end">
<Copyright Style="font-size:0.8em;" />
Expand Down
Loading

0 comments on commit 85f5f08

Please sign in to comment.