updating a security thing

This commit is contained in:
Rick Falkvinge
2014-02-24 16:18:34 +00:00
parent 89c79957e7
commit 34793a35e1
3 changed files with 6 additions and 7 deletions
@@ -20,7 +20,7 @@ namespace Swarmops.Frontend.Automation
People matches = People.FromSingle(Person.FromIdentity(Int32.Parse(personId)));
matches = Authorization.FilterPeopleToMatchAuthority(matches, CurrentUser.GetAuthority());
matches = matches.GetVisiblePeopleByAuthority(CurrentUser.GetAuthority());
if (matches.Count == 1) // still allowed
{
@@ -21,11 +21,11 @@ namespace Swarmops.Frontend.Automation
People matches = People.FromNamePattern(pattern);
matches = Authorization.FilterPeopleToMatchAuthority(matches, CurrentUser.GetAuthority());
matches = matches.GetVisiblePeopleByAuthority(CurrentUser.GetAuthority());
if (matches.Count > 20)
if (matches.Count > 10)
{
matches.RemoveRange(20, matches.Count - 20);
matches.RemoveRange(10, matches.Count - 10);
}
List<string> jsonPeople = new List<string>();
+2 -3
View File
@@ -60,8 +60,8 @@
var autoCompleteLoader = function(param,success,error){
var q = param.q || '';
if (q.length <= 3) {
return false;
if (q.length < 3) {
success (null);
}
$.ajax({
url: '/Automation/Json-SearchPeoplePattern.aspx',
@@ -71,7 +71,6 @@
namePattern: q
},
success: function(data){
console.log(data);
success(data);
},
error: function(){