mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
This commit is contained in:
parent
4d2539e1a2
commit
17502d695b
3 changed files with 5 additions and 12 deletions
|
@ -18,7 +18,6 @@ namespace PlexRequests.UI.Modules
|
|||
public DonationLinkModule(ICacheProvider provider, ISettingsService<PlexRequestSettings> pr, ISecurityExtensions security) : base("customDonation", pr, security)
|
||||
{
|
||||
Cache = provider;
|
||||
|
||||
Get["/", true] = async (x, ct) => await GetCustomDonationUrl(pr);
|
||||
}
|
||||
|
||||
|
@ -31,15 +30,13 @@ namespace PlexRequests.UI.Modules
|
|||
PlexRequestSettings settings = await pr.GetSettingsAsync();
|
||||
try
|
||||
{
|
||||
if (settings.EnableCustomDonationUrl)
|
||||
if (settings.EnableCustomDonationUrl && Security.IsLoggedIn(Context))
|
||||
{
|
||||
return Response.AsJson(new { url = settings.CustomDonationUrl, message = settings.CustomDonationMessage, enabled = true });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return Response.AsJson(new { enabled = false });
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Warn("Exception Thrown when attempting to check the custom donation url");
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
{
|
||||
@Html.GetNavbarUrl(Context, "/usermanagement", UI.Layout_Usermanagement, "users")
|
||||
}
|
||||
@*@if (Context.CurrentUser.IsAuthenticated()) // TODO replace with IsAdmin*@
|
||||
@if (Html.IsAdmin())
|
||||
{
|
||||
<li><a id="donate" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: red"></i> @UI.Layout_Donate</a></li>
|
||||
|
@ -48,12 +47,10 @@
|
|||
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@*@if (!Context.CurrentUser.IsAuthenticated() && Context.Request.Session[SessionKeys.UsernameKey] == null) // TODO replace with IsAdmin*@
|
||||
@if (!Html.IsLoggedIn(Context))
|
||||
{
|
||||
<li><a href="@url/login?redirect=@Context.Request.Path"><i class="fa fa-user"></i> @UI.Layout_Admin</a></li>
|
||||
}
|
||||
@*@if (Context.CurrentUser.IsAuthenticated()) // TODO replace with IsAdmin*@
|
||||
@if (Html.IsAdmin())
|
||||
{
|
||||
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
|
||||
|
@ -68,7 +65,6 @@
|
|||
</ul>
|
||||
</li>
|
||||
}
|
||||
@*@if (Context.Request.Session[SessionKeys.UsernameKey] != null && !Context.CurrentUser.IsAuthenticated())*@
|
||||
else if (Html.IsNormalUser()) // Logged in but not admin
|
||||
{
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -3,9 +3,9 @@ configuration: Release
|
|||
assembly_info:
|
||||
patch: true
|
||||
file: '**\AssemblyInfo.*'
|
||||
assembly_version: '1.10.0'
|
||||
assembly_version: '1.10.1'
|
||||
assembly_file_version: '{version}'
|
||||
assembly_informational_version: '1.10.0'
|
||||
assembly_informational_version: '1.10.1'
|
||||
before_build:
|
||||
- cmd: appveyor-retry nuget restore
|
||||
build:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue