diff --git a/Logic/Security/Accesses.cs b/Logic/Security/Accesses.cs
index 1b7870bf..a33cf7d3 100644
--- a/Logic/Security/Accesses.cs
+++ b/Logic/Security/Accesses.cs
@@ -37,7 +37,8 @@ namespace Swarmops.Logic.Security
{
Unknown = 0,
Bookkeeping,
- Financials
+ Financials,
+ PersonData
}
public enum AccessType
diff --git a/Site5/App_Code/PageV5Base.cs b/Site5/App_Code/PageV5Base.cs
index ae43c1f7..86692e00 100644
--- a/Site5/App_Code/PageV5Base.cs
+++ b/Site5/App_Code/PageV5Base.cs
@@ -67,9 +67,9 @@ public class PageV5Base : System.Web.UI.Page
{
// Localization
- // Set default culture (English, United States, but that doesn't work so fake it to GB)
+ // Set default culture (English, United States)
- string preferredCulture = "en-GB";
+ string preferredCulture = "en-US";
// ----------- SET CULTURE ------------
@@ -83,7 +83,7 @@ public class PageV5Base : System.Web.UI.Page
else
{
// No, determine from browser
- string browserPreference = "en-GB";
+ string browserPreference = "en-US";
if (Request.UserLanguages != null && Request.UserLanguages.Length > 0)
{
browserPreference = Request.UserLanguages[0];
diff --git a/Site5/App_GlobalResources/Global.resx b/Site5/App_GlobalResources/Global.resx
index ab33ae20..43e31c85 100644
--- a/Site5/App_GlobalResources/Global.resx
+++ b/Site5/App_GlobalResources/Global.resx
@@ -475,4 +475,24 @@
Geography
As in "location" - on any scale and anywhere from "World" to a named city
+
+ Action
+ Header over a column of possible actions (signified by icons) in a datagrid.
+
+
+ Mail
+ Somebody's email address.
+
+
+ Name
+ A plain person's first and last name
+
+
+ Notes
+ Small notes in a grid, maybe in icon form
+
+
+ Phone
+ Somebody's telephone number. Mobile assumed.
+
\ No newline at end of file
diff --git a/Site5/Images/PageIcons/iconshock-group-search-40px.png b/Site5/Images/PageIcons/iconshock-group-search-40px.png
new file mode 100644
index 00000000..03ca7f49
Binary files /dev/null and b/Site5/Images/PageIcons/iconshock-group-search-40px.png differ
diff --git a/Site5/MainMenu-v5.xml b/Site5/MainMenu-v5.xml
index bef7096f..2419f1ad 100644
--- a/Site5/MainMenu-v5.xml
+++ b/Site5/MainMenu-v5.xml
@@ -16,7 +16,7 @@
People_ListFind
2
-
+ iconshock-group-search
/Pages/v5/Swarm/ListFindPeople.aspx
Link
diff --git a/Site5/Pages/v5/Swarm/Json-ListFindPeople.aspx.cs b/Site5/Pages/v5/Swarm/Json-ListFindPeople.aspx.cs
index 0867e9e8..7d1a5284 100644
--- a/Site5/Pages/v5/Swarm/Json-ListFindPeople.aspx.cs
+++ b/Site5/Pages/v5/Swarm/Json-ListFindPeople.aspx.cs
@@ -24,6 +24,13 @@ namespace Swarmops.Frontend.Pages.Swarm
int geographyId = int.Parse(geographyString);
Geography geography = Geography.FromIdentity(geographyId);
+ if (
+ !this.CurrentUser.HasAccess(new Access(this.CurrentOrganization, geography, AccessAspect.PersonData,
+ AccessType.Read)))
+ {
+ throw new UnauthorizedAccessException("nope");
+ }
+
People matches = People.FromOrganizationAndGeographyWithPattern(this.CurrentOrganization, geography, pattern);
// matches = Authorization.FilterPeopleToMatchAuthority(matches, CurrentUser.GetAuthority());
@@ -42,11 +49,13 @@ namespace Swarmops.Frontend.Pages.Swarm
foreach (Person person in matches)
{
- string onePerson = '{' + String.Format("\"id\":\"{0}\",\"name\":\"{1}\",\"avatar16Url\":\"{2}\",\"geographyName\":\"{3}\"",
+ string onePerson = '{' + String.Format("\"id\":\"{0}\",\"name\":\"{1}\",\"avatar16Url\":\"{2}\",\"geographyName\":\"{3}\",\"mail\":\"{4}\",\"phone\":\"{5}\"",
person.Identity,
JsonSanitize(person.Canonical),
person.GetSecureAvatarLink(16),
- JsonSanitize(person.Geography.Name)) + '}';
+ JsonSanitize(person.Geography.Name),
+ JsonSanitize(person.Mail),
+ JsonSanitize(person.Phone)) + '}';
jsonPeople.Add(onePerson);
}
diff --git a/Site5/Pages/v5/Swarm/ListFindPeople.aspx b/Site5/Pages/v5/Swarm/ListFindPeople.aspx
index cdc8c8da..9471730c 100644
--- a/Site5/Pages/v5/Swarm/ListFindPeople.aspx
+++ b/Site5/Pages/v5/Swarm/ListFindPeople.aspx
@@ -31,6 +31,10 @@
if (newNamePattern != lastNamePattern && newNamePattern.length >= 3) {
lastNamePattern = newNamePattern;
$('#TableSearchResults').datagrid({ url: 'Json-ListFindPeople.aspx?Pattern=' + escape(newNamePattern) + '&GeographyId=' + selectedGeographyId });
+ } else if (newNamePattern.length < 3 && newNamePattern != lastNamePattern && selectedGeographyId != 1) {
+ $('#TableSearchResults').datagrid({ url: 'Json-ListFindPeople.aspx?Pattern=&GeographyId=' + selectedGeographyId });
+ } else { // empty pattern and "world"
+ $('#TableSearchResults').datagrid({ url: '' });
}
});
@@ -141,7 +145,11 @@
function onGeographyChange(newGeographyId) {
if (newGeographyId != selectedGeographyId) {
selectedGeographyId = newGeographyId;
- $('#TableSearchResults').datagrid({ url: 'Json-ListFindPeople.aspx?Pattern=' + escape(lastNamePattern) + '&GeographyId=' + selectedGeographyId });
+ if (selectedGeographyId != 1 || lastNamePattern.length > 2) { // do not allow carte-blance listing for "world"
+ $('#TableSearchResults').datagrid({ url: 'Json-ListFindPeople.aspx?Pattern=' + escape(lastNamePattern) + '&GeographyId=' + selectedGeographyId });
+ } else {
+ $('#TableSearchResults').datagrid({ url: '' });
+ }
}
}
@@ -171,13 +179,12 @@
idField="itemId">
- |
- |
- |
- |
- |
- |
- |
+ |
+ |
+ |
+ |
+ |
+ |
diff --git a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
index 073bca86..67c7844e 100644
--- a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
+++ b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
@@ -17,7 +17,7 @@ namespace Swarmops.Frontend.Pages.Swarm
{
protected void Page_Load(object sender, EventArgs e)
{
- this.PageIcon = "iconshock-money-envelope";
+ this.PageIcon = "iconshock-group-search";
if (!Page.IsPostBack)
{
@@ -36,13 +36,12 @@ namespace Swarmops.Frontend.Pages.Swarm
this.LabelMatchingPeopleInX.Text = String.Format(Resources.Pages.People.ListFindPeople_MatchingPeopleInX,
this.CurrentOrganization.Name);
- this.LabelGridHeaderAccount.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_BankAccount;
- this.LabelGridHeaderAmount.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_Amount;
- this.LabelGridHeaderBank.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_BankName;
- this.LabelGridHeaderDue.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_DueDate;
- this.LabelGridHeaderPaid.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_PaidOut;
- this.LabelGridHeaderRecipient.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_Recipient;
- this.LabelGridHeaderReference.Text = Resources.Pages.Financial.PayOutMoney_GridHeader_Reference;
+ this.LabelGridHeaderAction.Text = Resources.Global.Global_Action;
+ this.LabelGridHeaderGeography.Text = Resources.Global.Global_Geography;
+ this.LabelGridHeaderMail.Text = Resources.Global.Global_Mail;
+ this.LabelGridHeaderName.Text = Resources.Global.Global_Name;
+ this.LabelGridHeaderPhone.Text = Resources.Global.Global_Phone;
+ this.LabelGridHeaderNotes.Text = Resources.Global.Global_Notes;
}