pull/963/head
Jamie.Rees 8 years ago
parent 80a9e54c4b
commit eec7d42a88

@ -233,13 +233,28 @@ namespace Ombi.UI.Modules
var result = await AuthenticationSetup(userId, username, dateTimeOffset, loginGuid, isOwner);
var landingSettings = await LandingPageSettings.GetSettingsAsync();
if (landingSettings.Enabled)
{
if (!landingSettings.BeforeLogin) // After Login
{
var uri = Linker.BuildRelativeUri(Context, "LandingPageIndex");
if (loginGuid != Guid.Empty)
{
return CustomModuleExtensions.LoginAndRedirect(this, result.LoginGuid, null, uri.ToString());
}
return Response.AsRedirect(uri.ToString());
}
}
var retVal = Linker.BuildRelativeUri(Context, "SearchIndex");
if (result.LoginGuid != Guid.Empty)
{
return CustomModuleExtensions.LoginAndRedirect(this, result.LoginGuid, null, retVal.ToString());
}
return Response.AsJson(new { result = true, url = retVal.ToString() });
}
private async Task<PlexUsers> IsPlexUser(string username)
@ -318,6 +333,21 @@ namespace Ombi.UI.Modules
var m = await AuthenticationSetup(userId, username, dateTimeOffset, loginGuid, isOwner);
var landingSettings = await LandingPageSettings.GetSettingsAsync();
if (landingSettings.Enabled)
{
if (!landingSettings.BeforeLogin) // After Login
{
var uri = Linker.BuildRelativeUri(Context, "LandingPageIndex");
if (m.LoginGuid != Guid.Empty)
{
return CustomModuleExtensions.LoginAndRedirect(this, m.LoginGuid, null, uri.ToString());
}
return Response.AsRedirect(uri.ToString());
}
}
var retVal = Linker.BuildRelativeUri(Context, "SearchIndex");
if (m.LoginGuid != Guid.Empty)
{

@ -8,6 +8,10 @@
<legend>User Management Settings</legend>
<span>Here you can manage the default permissions and features that your users get</span>
<small>
Note: This will not update your users that are currently there, this is to set the default settings to any users added outside of Ombi e.g. You share your Plex Server with a new user, they will be added into Ombi
automatically and will take the permissions and features you have selected below.
</small>
<h3>Permissions</h3>

Loading…
Cancel
Save