Fix unable to add ACLs

This commit is contained in:
nathangray
2017-03-09 08:54:50 -07:00
parent 6221e69229
commit e34e679733
2 changed files with 7 additions and 4 deletions

View File

@@ -560,9 +560,10 @@ app.classes.admin = AppJS.extend(
// Only send the request if they entered everything (or selected no apps)
if(_value.acl_account && (_value.acl_appname && _value.acl_location || typeof _value.apps != 'undefined'))
{
var id = [];
if(_value.acl_appname && _value.acl_account && _value.acl_location)
{
var id = _value.acl_appname+':'+_value.acl_account+':'+_value.acl_location;
id = _value.acl_appname+':'+_value.acl_account+':'+_value.acl_location;
if(content && content.id && id != content.id)
{
// Changed the account or location, remove previous or we
@@ -570,9 +571,9 @@ app.classes.admin = AppJS.extend(
this.egw.json(className+'::ajax_change_acl', [content.id, 0], null,this,false,this)
.sendRequest();
}
id = [id];
}
var rights = 0;
var id = [];
for(var i in _value.acl)
{
rights += parseInt(_value.acl[i]);