Skip to content

Commit

Permalink
Remove license check (#1035)
Browse files Browse the repository at this point in the history
* remove license check

* removed IsDirty

---------

Co-authored-by: jackcaver <[email protected]>
  • Loading branch information
jackcaver and jackcaver authored Jun 23, 2024
1 parent be11e13 commit 0fd76f1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<p><b>Branch</b>: @VersionHelper.Branch</p>
<p><b>Build</b>: @VersionHelper.Build</p>
<p><b>CommitHash</b>: @VersionHelper.CommitHash</p>
<p><b>IsDirty</b>: @VersionHelper.IsDirty</p>
<p><b>RepositoryUrl</b>: @VersionHelper.RepositoryUrl</p>
24 changes: 0 additions & 24 deletions ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,6 @@
</div>
</div>
</noscript>
@if (!ServerStatics.IsDebug() && VersionHelper.IsDirty)
{
<div class="ui bottom attached red message large">
<div class="ui container">
<i class="warning icon"></i>
<span style="font-size: 1.2rem;">@Model.Translate(BaseLayoutStrings.LicenseWarnTitle)</span>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn1,
"<a href=\"https://github.com/LBPUnion/project-lighthouse/blob/main/LICENSE\">GNU Affero General Public License v3.0</a>"))
</p>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn2,
"<code>git status</code>", "<a href=\"https://github.com/LBPUnion/project-lighthouse/issues\">", "</a>"))
</p>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn3))
</p>
</div>
</div>
}
@if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode)
{
<div class="ui bottom attached red message large">
Expand Down Expand Up @@ -234,10 +214,6 @@
<span class="ui text red">Cannot Detect Source Code</span>
}
</span>
@if (VersionHelper.IsDirty)
{
<p>@Model.Translate(BaseLayoutStrings.GeneratedModified)</p>
}
</div>
</div>
@if (ServerStatics.IsDebug())
Expand Down
1 change: 0 additions & 1 deletion ProjectLighthouse/Helpers/VersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public static class VersionHelper
public static string EnvVer => $"{ServerConfiguration.Instance.Customization.EnvironmentName} {FullRevision}";
public static string FullVersion =>
$"Project Lighthouse {ServerConfiguration.Instance.Customization.EnvironmentName} {Branch}@{CommitHash} {Build}";
public static bool IsDirty => ThisAssembly.Git.IsDirty;
public static string RepositoryUrl => ThisAssembly.Git.RepositoryUrl;

public const string Build =
Expand Down
6 changes: 0 additions & 6 deletions ProjectLighthouse/StartupTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ public static async Task Run(ServerType serverType)

// Version info depends on ServerConfig
Logger.Info($"You are running version {VersionHelper.FullVersion}", LogArea.Startup);
if (VersionHelper.IsDirty)
{
Logger.Warn("This is a modified version of Project Lighthouse. " +
"Please make sure you are properly disclosing the source code to any users who may be using this instance.",
LogArea.Startup);
}

Logger.Info("Connecting to the database...", LogArea.Startup);

Expand Down

0 comments on commit 0fd76f1

Please sign in to comment.