Fix login issue

This commit is contained in:
Stephan
2017-10-20 15:35:30 +02:00
parent e3bc98a155
commit edfe212227
6 changed files with 181 additions and 71 deletions

View File

@@ -63,6 +63,11 @@
<add key="umbracoTimeOutInMinutes" value="20" />
<add key="umbracoDefaultUILanguage" value="en" />
<add key="umbracoUseSSL" value="false" />
<add key="Umbraco.Tests.LocalDbTestDatabase.EmptyPoolSize" value="3" />
<add key="Umbraco.Tests.LocalDbTestDatabase.EmptyPoolThreadCount" value="2" />
<add key="Umbraco.Tests.LocalDbTestDatabase.SchemaPoolSize" value="5" />
<add key="Umbraco.Tests.LocalDbTestDatabase.SchemaPoolThreadCount" value="2" />
</appSettings>
<connectionStrings>

View File

@@ -1,6 +1,9 @@
(function () {
'use strict';
// comes from https://codepen.io/jakob-e/pen/eNBQaP
// works fine with Angular 1.6.5 - alas not with 1.1.5 - binding issue
function PasswordToggleDirective($compile) {
var directive = {

View File

@@ -16,7 +16,13 @@
maxFileSize: Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB",
acceptedFileTypes: mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes),
uploaded: false
}
}
$scope.togglePassword = function () {
console.log('toggle');
var elem = $("form[name='loginForm'] input[name='password']");
console.log(elem);
elem.attr("type", (elem.attr("type") === "text" ? "password" : "text"));
}
function init() {
// Check if it is a new user
@@ -48,7 +54,7 @@
]).then(function () {
$scope.inviteStep = Number(inviteVal);
});
}
}
@@ -82,7 +88,7 @@
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10);
// set percentage property on file
$scope.avatarFile.uploadProgress = progressPercentage;
$scope.avatarFile.uploadProgress = progressPercentage;
}
}).success(function (data, status, headers, config) {
@@ -149,11 +155,11 @@
//error
formHelper.handleError(err);
$scope.invitedUserPasswordModel.buttonState = "error";
});
}
}
};
var setFieldFocus = function (form, field) {
@@ -180,7 +186,7 @@
}
function resetInputValidation() {
$scope.confirmPassword = "";
$scope.confirmPassword = "";
$scope.password = "";
$scope.login = "";
if ($scope.loginForm) {
@@ -255,7 +261,7 @@
//TODO: Do validation properly like in the invite password update
//if the login and password are not empty we need to automatically
//if the login and password are not empty we need to automatically
// validate them - this is because if there are validation errors on the server
// then the user has to change both username & password to resubmit which isn't ideal,
// so if they're not empty, we'll just make sure to set them to valid.
@@ -289,7 +295,7 @@
});
//setup a watch for both of the model values changing, if they change
// while the form is invalid, then revalidate them so that the form can
// while the form is invalid, then revalidate them so that the form can
// be submitted again.
$scope.loginForm.username.$viewChangeListeners.push(function () {
if ($scope.loginForm.username.$invalid) {

View File

@@ -149,8 +149,9 @@
<div class="control-group" ng-class="{error: loginForm.password.$invalid}">
<label><localize key="general_password">Password</localize></label>
<input type="password" ng-model="password" name="password" class="-full-width-input" localize="placeholder" placeholder="@placeholders_password" autocomplete="off" umb-password-toggle />
</div>
<div class="password-toggle">
<input type="password" ng-model="password" name="password" class="-full-width-input" localize="placeholder" placeholder="@placeholders_password" autocomplete="off" /><a ng-click="togglePassword()">Toggle</a>
</div>
<div class="flex justify-between items-center">
<button type="submit" class="btn btn-success" val-trigger-change="#login .form input"><localize key="general_login">Login</localize></button>

View File

@@ -1,7 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<%@ Page Language="C#" AutoEventWireup="true"%>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ Import Namespace="Umbraco.Deploy.UI" %>
<%@ Import Namespace="Umbraco.Web" %>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
@@ -11,51 +11,146 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="../../Umbraco/assets/css/nonodes.style.min.css" />
<link href='//fonts.googleapis.com/css?family=Open+Sans:300,400,700,600' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<%=IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/assets/css/nonodes.style.min.css" />
<link rel="stylesheet" href="<%=IOHelper.ResolveUrl(SystemDirectories.AppPlugins)%>/deploy/assets/css/deploy.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
<![endif]-->
</head>
<body>
<% if(HttpContext.Current.Request.IsLocal == false){ %>
<section>
<article>
<div>
<div class="logo"></div>
<article>
<div>
<div class="logo"></div>
<h1>Welcome to your Umbraco installation</h1>
<h3>You're seeing this wonderful page because your website doesn't contain any published content yet.</h3>
<h1>Welcome to your Umbraco installation</h1>
<h3>You're seeing the wonderful page because your website doesn't contain any published content yet.</h3>
<div class="cta">
<a href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>" class="button">Open Umbraco</a>
</div>
<div class="cta">
<a href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>" class="button">Open Umbraco</a>
</div>
<div class="row">
<div class="col">
<h2>Easy start with Umbraco.tv</h2>
<p>We have created a bunch of 'how-to' videos, to get you easily started with Umbraco. Learn how to build projects in just a couple of minutes. Easiest CMS in the world.</p>
<a href="http://umbraco.tv?ref=tvFromInstaller" target="_blank">Umbraco.tv &rarr;</a>
</div>
<div class="row">
<div class="col">
<h2>Easy start with Umbraco.tv</h2>
<p>We have created a bunch of 'how-to' videos, to get you easily started with Umbraco. Learn how to build projects in just a couple of minutes. Easiest CMS in the world.</p>
<div class="col">
<h2>Be a part of the community</h2>
<p>The Umbraco community is the best of its kind, be sure to visit, and if you have any questions, we're sure that you can get your answers from the community.</p>
<a href="http://our.umbraco.org?ref=ourFromInstaller" target="_blank">our.Umbraco &rarr;</a>
</div>
</div>
<a href="http://umbraco.tv?ref=tvFromInstaller" target="_blank">Umbraco.tv &rarr;</a>
</div>
</div>
</article>
<div class="col">
<h2>Be a part of the community</h2>
<p>The Umbraco community is the best of its kind, be sure to visit, and if you have any questions, were sure that you can get your answers from the community.</p>
<a href="http://our.umbraco.org?ref=ourFromInstaller" target="_blank">our.Umbraco &rarr;</a>
</div>
</div>
</div>
</article>
</section>
<% }else{ %>
<section ng-controller="Umbraco.NoNodes.Controller as vm">
<article class="ud-nonodes" ng-cloak>
<div>
<div class="logo"></div>
<div>
<div ng-if="vm.restore.status === ''">
<h1>Initializing your website...</h1>
<div ng-if="vm.isDebug && vm.requiresInitialization">
<small>Press the button below to get started</small>
<div class="cta">
<button class="button" ng-click="vm.restoreSchema()">Go!</button>
</div>
</div>
</div>
<div ng-if="vm.restore.status === 'ready'">
<h1>Restore from Umbraco Cloud</h1>
<div class="cta">
<button class="button" ng-click="vm.restoreData()">Restore</button>
<small><span>or</span> <a ng-href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>">Skip restore and open Umbraco</a></small>
</div>
</div>
<div ng-if="vm.restore.status === 'inProgress'">
<h1>{{ vm.restore.restoreMessage }}</h1>
<p>{{ vm.restore.restoreProgress }}% restored</p>
<small>{{ vm.restore.currentActivity }}</small>
<div class="timestamp">{{ vm.restore.timestamp }}</div>
</div>
<div ng-if="vm.restore.status === 'completed'">
<h1>Ready to rock n' roll!</h1>
<p>Everything has been restored and is ready for use, click below to open Umbraco</p>
<div class="cta">
<a href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>" class="button">Open Umbraco</a>
</div>
</div>
<ud-error
ng-if="vm.restore.error.hasError"
comment="vm.restore.error.comment"
log="vm.restore.error.log"
exception="vm.restore.error.exception"
status="vm.restore.status"
class="ud-restore-error"
operation="restore"
no-nodes="true"
on-debug="vm.showDebug()">
</ud-error>
<div class="umb-deploy-debug" ng-if="vm.restore.showDebug">
<div class="umb-deploy-debug-console" ng-bind-html-unsafe="vm.restore.trace"></div>
</div>
<%--<div ng-if="vm.restore.error.hasError" class="json">
<h1 style="margin-top: 0;">An error occurred: </h1>
<h2 ng-if="vm.restore.error.exceptionMessage">{{ vm.restore.error.exceptionMessage }}</h2>
<a href="#" ng-click="vm.showLog()" ng-hide="vm.logIsvisible">Show details</a>
<pre ng-if="vm.logIsvisible === true">{{ vm.restore.error.log }}</pre>
</div>--%>
</div>
</div>
</article>
</section>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<%= NoNodesHelper.ServerVariables(HttpContext.Current.Request.RequestContext, UmbracoContext.Current) %>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/lib/moment/moment-with-locales.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/lib/angular/1.1.5/angular.min.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.AppPlugins) %>/deploy/lib/signalr/jquery.signalR.min.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/backoffice/signalr/hubs"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.AppPlugins) %>/deploy/js/nonodes.modules.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.AppPlugins) %>/deploy/js/deploy.services.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.AppPlugins) %>/deploy/js/deploy.components.js"></script>
<script type="text/javascript" src="<%= IOHelper.ResolveUrl(SystemDirectories.AppPlugins) %>/deploy/js/nonodes.bootstrap.js"></script>
<script type="text/javascript">
angular.bootstrap(document, ['umbraco.nonodes']);
</script>
<% } %>
</body>
</html>
</html>

View File

@@ -10,12 +10,12 @@
<autoFillImageProperties>
<uploadField alias="umbracoFile">
<widthFieldAlias>umbracoWidth</widthFieldAlias>
<heightFieldAlias>umbracoHeight</heightFieldAlias>
<heightFieldAlias>umbracoHeight</heightFieldAlias>
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
</uploadField>
</autoFillImageProperties>
</imaging>
<scripteditor>
<!-- Path to script folder - no ending "/" -->
@@ -98,9 +98,9 @@
error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->
<MacroErrors>throw</MacroErrors>
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,svg,php,htaccess</disallowedUploadFiles>
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess</disallowedUploadFiles>
<!-- If completed, only the file extensions listed below will be allowed to be uploaded. If empty, disallowedUploadFiles will apply to prevent upload of specific file extensions. -->
<allowedUploadFiles></allowedUploadFiles>
@@ -109,13 +109,13 @@
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
<showDeprecatedPropertyEditors>false</showDeprecatedPropertyEditors>
<!-- Enables value converters for all built in property editors so that they return strongly typed object, recommended for use with Models Builder -->
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
<!-- You can specify your own background image for the login screen here. The image will automatically get an overlay to match back office colors - this path is relative to the ~/umbraco path. The default location is: /umbraco/assets/img/installer.jpg -->
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
</content>
<security>
@@ -124,7 +124,7 @@
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
<!-- set to true to enable the UI and API to allow back-office users to reset their passwords -->
<allowPasswordReset>true</allowPasswordReset>
@@ -209,7 +209,7 @@
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
<viewstateMoverModule enable="false" />
<!--
<!--
Now that we have Log4Net logging enabled, this section is only used for what gets logged to the umbracoLog table
which currently logs items used in the audit trail and roll back scenarios.
-->
@@ -237,40 +237,40 @@
<!--
When distributed call is enabled, you need to add all of the servers part taking in load balancing
to the server list below.
to the server list below.
-->
<servers>
<!--
<!--
Add ip number or hostname, make sure that it can be reached from all servers
you can also add optional attributes to force a protocol or port number.
Examples:
<server>127.0.0.1</server>
<server forceProtocol="http|https" forcePortnumber="80|443">127.0.0.1</server>
Generally when setting up load balancing you will designate a 'master' server,
Generally when setting up load balancing you will designate a 'master' server,
Umbraco will always assume that the FIRST server listed in this list is the 'master'.
(NOTE: Not all load balancing scenarios have a 'master', depends on how you are setting it up)
In order for scheduled tasks (including scheduled publishing) to work properly when load balancing, each
In order for scheduled tasks (including scheduled publishing) to work properly when load balancing, each
server in the load balanced environment needs to know if it is the 'master'. In order for servers
to know this or not, they need to compare some values against the servers listed. These values
are either: serverName or appId. You should not enter both values but appId will always supersede serverName.
The serverName is the easiest and will work so long as you are not load balancing your site on the same server.
If you are doing this, then you will need to use appId which is equivalent to the value returned from
HttpRuntime.AppDomainAppId. It is recommended that you set either the serverName or appId for all servers
HttpRuntime.AppDomainAppId. It is recommended that you set either the serverName or appId for all servers
registered here if possible, not just the first one.
Examples:
<server serverName="MyServer">server1.mysite.com</server>
<server appId="/LM/W3SVC/69/ROOT">server1.mysite.com</server>
<server serverName="MyServer">server1.mysite.com</server>
<server appId="/LM/W3SVC/69/ROOT">server1.mysite.com</server>
-->
</servers>
</distributedCall>
@@ -288,7 +288,7 @@
</users>
</providers>
<!--
<!--
web.routing
@trySkipIisCustomErrors
Tries to skip IIS custom errors.
@@ -304,11 +304,11 @@
@disableAlternativeTemplates
By default you can add a altTemplate querystring or append a template name to the current URL which
will make Umbraco render the content on the current page with the template you requested, for example:
http://mysite.com/about-us/?altTemplate=Home and http://mysite.com/about-us/Home would render the
"About Us" page with a template with the alias Home. Setting this setting to true stops that behavior
http://mysite.com/about-us/?altTemplate=Home and http://mysite.com/about-us/Home would render the
"About Us" page with a template with the alias Home. Setting this setting to true stops that behavior
@disableFindContentByIdPath
By default you can call any content Id in the url and show the content with that id, for example:
http://mysite.com/1092 or http://mysite.com/1092.aspx would render the content with id 1092. Setting
http://mysite.com/1092 or http://mysite.com/1092.aspx would render the content with id 1092. Setting
this setting to true stops that behavior
@umbracoApplicationUrl
The url of the Umbraco application. By default, Umbraco will figure it out from the first request.