diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs
index 5fb2fd7d8a..2feae59bad 100644
--- a/src/Umbraco.Core/Constants-Applications.cs
+++ b/src/Umbraco.Core/Constants-Applications.cs
@@ -114,6 +114,11 @@
///
public const string UserTypes = "userTypes";
+ ///
+ /// alias for the users tree.
+ ///
+ public const string Users = "users";
+
public const string Scripts = "scripts";
public const string PartialViews = "partialViews";
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
index c1e806177a..20e252c431 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
@@ -964,6 +964,7 @@
Šablony
XSLT soubory
Typy Uživatelů
+ Uživatelé
Nová aktualizace je připrvena
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml
index 0d527fe4d8..12031dc0e0 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml
@@ -929,6 +929,7 @@ Vennlig hilsen Umbraco roboten
XSLT Filer
Analytics
Brukertyper typer
+ Brukere
Ny oppdatering er klar
diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config
index b1820c3460..e26259c357 100644
--- a/src/Umbraco.Web.UI/config/trees.config
+++ b/src/Umbraco.Web.UI/config/trees.config
@@ -23,7 +23,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
index aad5e0d69b..df4318ec2a 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
@@ -999,6 +999,7 @@ Mange hilsner fra Umbraco robotten
XSLT-filer
Analytics
Bruger Typer
+ Brugere
Ny opdatering er klar
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
index 158bb06287..4bb906f983 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml
@@ -947,6 +947,7 @@ Ihr freundlicher Umbraco-Robot
XSLT-Dateien
Auswertungen
Benutzertypen
+ Benutzer
Neues Update verfügbar
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index f6d092ba31..b8f362954d 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -1189,6 +1189,7 @@ To manage your website, simply open the Umbraco back office and start adding con
XSLT Files
Analytics
User Types
+ Users
New update ready
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
index f89eb06b94..dc82daaa49 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
@@ -1193,6 +1193,7 @@ To manage your website, simply open the Umbraco back office and start adding con
XSLT Files
Analytics
User Types
+ Users
New update ready
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
index ef67c6e6d4..097c028d2b 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml
@@ -851,6 +851,7 @@
Plantillas
Archivos XSLT
Tipos de Usuarios
+ Usuarios
Existe una nueva actualización
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
index 4045056567..853f1b11f1 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml
@@ -985,6 +985,7 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à
Modèles
Fichiers XSLT
Types d'utilisateurs
+ Utilisateurs
Nouvelle mise à jour prête
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
index 8722008a2e..e42c382b20 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml
@@ -870,6 +870,7 @@ To manage your website, simply open the Umbraco back office and start adding con
תבניות
קבצי XSLT
משתמש מקליד
+ משתמש
עידכון חדש זמין
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
index f4475cb23c..039d727044 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml
@@ -843,6 +843,7 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i
Templates
Files XSLT
Tipi di Utente
+ Utenti
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml
index b92f17a57e..b74676dc50 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml
@@ -1159,7 +1159,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
役割
メンバーの種類
ドキュメントタイプ
- 関連タイプ
+ 関連タイプ
パッケージ
パッケージ
Python ファイル
@@ -1173,6 +1173,7 @@ Runwayをインストールして作られた新しいウェブサイトがど
XSLT ファイル
アナリティクス
ユーザータイプ
+ ユーザー
新しい更新があります
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
index 9743954202..8435cb9c48 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml
@@ -847,6 +847,7 @@
템플릿
XSLT 파일
사용자 유형
+ 사용자
새 업데이트가 준비되었습니다.
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
index 9cf8e76337..d69d5954dd 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
@@ -952,6 +952,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de
Sjablonen
XSLT Bestanden
Gebruiker Types
+ Gebruikers
Nieuwe update beschikbaar
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml
index 132f5ee65e..dbdefcb6c2 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml
@@ -743,6 +743,7 @@ Miłego dnia!]]>
Szablony
Pliki XSLT
Typy Użytkowników
+ Użytkowników
Aktualizacja jest gotowa
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
index 9cf9181c80..86887b00df 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml
@@ -831,6 +831,7 @@ Para fechar a tarefa de tradução vá até os detalhes e clique no botão "Fech
Modelos
Arquivos XSLT
Tipos de Usuários
+ Usuários
Nova atualização pronta
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
index 5075fd8eb9..454216ed9d 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
@@ -1162,6 +1162,7 @@
Шаблоны
Файлы XSLT
Типы пользователей
+ пользователи
Доступны обновления
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
index 3c7947ccee..ae7e8a479e 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml
@@ -852,6 +852,7 @@
Sidmallar
XSLT-filer
Användartyper
+ Användare
Ny uppdatering tillgänglig
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
index 9ced516644..4e25e92ef2 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
@@ -921,6 +921,7 @@
模板
XSLT文件
用户类型
+ Users
有可用更新
diff --git a/src/Umbraco.Web/Trees/UsersTreeController.cs b/src/Umbraco.Web/Trees/UsersTreeController.cs
new file mode 100644
index 0000000000..2cd2ec562f
--- /dev/null
+++ b/src/Umbraco.Web/Trees/UsersTreeController.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Net.Http.Formatting;
+using Umbraco.Core;
+using Umbraco.Core.Configuration;
+using Umbraco.Core.Models;
+using Umbraco.Core.Models.Membership;
+using Umbraco.Web.WebApi.Filters;
+using Umbraco.Web._Legacy.Actions;
+using Umbraco.Core.Services;
+using Umbraco.Web.Models.Trees;
+using Umbraco.Web.Mvc;
+using Constants = Umbraco.Core.Constants;
+
+namespace Umbraco.Web.Trees
+{
+ [UmbracoTreeAuthorize(Constants.Trees.Users)]
+ [Tree(Constants.Applications.Users, Constants.Trees.Users, null)]
+ [PluginController("UmbracoTrees")]
+ [CoreTree]
+ public class UsersTreeController : TreeController
+ {
+ protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
+ {
+ var nodes = new TreeNodeCollection();
+
+ int totalusers;
+ var users = new List(Services.UserService.GetAll(0, int.MaxValue, out totalusers));
+
+ var currentUser = UmbracoContext.Current.Security.CurrentUser;
+ var currentUserIsAdmin = currentUser.IsAdmin();
+
+ foreach (var user in users.OrderBy(x => x.IsApproved == false))
+ {
+ if (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice &&
+ (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice == false ||
+ user.IsApproved == false))
+ {
+ continue;
+ }
+
+ var node = CreateTreeNode(
+ user.Id.ToString(CultureInfo.InvariantCulture),
+ "-1",
+ queryStrings,
+ user.Name,
+ "icon-user",
+ false,
+ "/" + queryStrings.GetValue("application") + "/framed/"
+ + Uri.EscapeDataString("users/EditUser.aspx?id=" + user.Id));
+
+ if (user.Id == 0)
+ {
+ if (currentUser.Id != 0)
+ continue;
+ }
+ else if (currentUserIsAdmin == false && user.IsAdmin())
+ continue;
+
+ if (user.IsApproved == false)
+ node.CssClasses.Add("not-published");
+
+ nodes.Add(node);
+ }
+
+ return nodes;
+ }
+
+ protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
+ {
+ var menu = new MenuItemCollection();
+
+ if (id == Constants.System.Root.ToInvariantString())
+ {
+ // Root actions
+ menu.Items.Add(Services.TextService.Localize("actions", ActionNew.Instance.Alias))
+ .ConvertLegacyMenuItem(null, "users", queryStrings.GetValue("application"));
+
+ menu.Items.Add(
+ Services.TextService.Localize("actions", ActionRefresh.Instance.Alias), true);
+ return menu;
+ }
+
+ // If administator, don't create a menu
+ if (id == "0")
+ return menu;
+
+ // Disable user
+ menu.Items.Add(
+ Services.TextService.Localize("actions", ActionDisable.Instance.Alias),
+ false,
+ new Dictionary
+ {
+ {MenuItem.JsActionKey, ActionDisable.Instance.JsFunctionName}
+ }
+ );
+
+ return menu;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index 318c23414b..cc7bc3082b 100644
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -332,6 +332,7 @@
+
@@ -1532,7 +1533,6 @@
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs
deleted file mode 100644
index e5418c37be..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Umbraco.Core.Configuration;
-using umbraco.cms.presentation.Trees;
-using System.Linq;
-using Umbraco.Core;
-using Umbraco.Core.Models;
-using Umbraco.Core.Models.Membership;
-using Umbraco.Web;
-using Umbraco.Web.Trees;
-using Umbraco.Web._Legacy.Actions;
-
-
-namespace umbraco
-{
- ///
- /// Handles loading of all umbraco users into the users application tree
- ///
- [Tree(Constants.Applications.Users, "users", "Users")]
- public class loadUsers : BaseTree
- {
- public loadUsers(string application) : base(application) { }
-
- protected override void CreateRootNode(ref XmlTreeNode rootNode)
- {
- }
-
- ///
- /// Renders the Javascript.
- ///
- /// The javascript.
- public override void RenderJS(ref StringBuilder Javascript)
- {
- Javascript.Append(
- @"
-function openUser(id) {
- UmbClientMgr.contentFrame('users/editUser.aspx?id=' + id);
-}
-");
- }
-
- protected override void CreateAllowedActions(ref List actions)
- {
- actions.Clear();
- actions.Add(ActionDisable.Instance);
- }
-
- public override void Render(ref XmlTree tree)
- {
- int totalusers;
- var users = new List(Services.UserService.GetAll(0, int.MaxValue, out totalusers));
-
- var currUser = UmbracoContext.Current.Security.CurrentUser;
-
- bool currUserIsAdmin = currUser.IsAdmin();
- foreach (var u in users.OrderBy(x => x.IsApproved == false))
- {
- if (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice == false
- || (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice && u.IsApproved))
- {
-
- XmlTreeNode xNode = XmlTreeNode.Create(this);
-
- // special check for ROOT user
- if (u.Id == 0)
- {
- //if its the administrator, don't create a menu
- xNode.Menu = null;
- //if the current user is not the administrator, then don't add this node.
- if (currUser.Id != 0)
- continue;
- }
- // Special check for admins in general (only show admins to admins)
- else if (!currUserIsAdmin && u.IsAdmin())
- {
- continue;
- }
-
-
-
-
-
- //xNode.IconClass = "umbraco-tree-icon-grey";
-
- xNode.NodeID = u.Id.ToString();
- xNode.Text = u.Name;
- xNode.Action = "javascript:openUser(" + u.Id + ");";
- xNode.Icon = "icon-user";
- xNode.OpenIcon = "icon-user";
-
- if (u.IsApproved == false) {
- xNode.Style.DimNode();
- }
-
- OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
- if (xNode != null)
- {
- tree.Add(xNode);
- OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
- }
-
-
- }
-
-
- }
- }
-
- }
-
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
index bbae68379c..7ec80470a7 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
@@ -214,8 +214,8 @@ namespace umbraco.cms.presentation.user
SetupForm();
ClientTools
- .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias)
- .SyncTree(UID.ToString(), IsPostBack);
+ .SetActiveTreeType(Constants.Trees.Users)
+ .SyncTree(UID.ToString(), false);
}