|
|
@ -48,7 +48,6 @@ public class InternalCache extends InternalStorage |
|
|
|
{ |
|
|
|
{ |
|
|
|
final ResolutionParams params = new ResolutionParams(); |
|
|
|
final ResolutionParams params = new ResolutionParams(); |
|
|
|
params.applicableIdentifiers = player; |
|
|
|
params.applicableIdentifiers = player; |
|
|
|
params.destRegions = new String[] {}; |
|
|
|
|
|
|
|
return resolvePlayer(params); |
|
|
|
return resolvePlayer(params); |
|
|
|
} |
|
|
|
} |
|
|
|
public synchronized ResolutionResult resolvePlayer(ResolutionParams params) |
|
|
|
public synchronized ResolutionResult resolvePlayer(ResolutionParams params) |
|
|
@ -56,11 +55,11 @@ public class InternalCache extends InternalStorage |
|
|
|
params.groupList = new LinkedList<>(); |
|
|
|
params.groupList = new LinkedList<>(); |
|
|
|
params.finalPerms = new TreeMap<>(); |
|
|
|
params.finalPerms = new TreeMap<>(); |
|
|
|
params.instantiator = ""; |
|
|
|
params.instantiator = ""; |
|
|
|
params.depth = 0; |
|
|
|
params.branchDepth = 0; |
|
|
|
|
|
|
|
if(params.destRegions == null) |
|
|
|
|
|
|
|
params.destRegions = new String[] {}; |
|
|
|
if(implicit_u != null && implicit_u.permissions != null) |
|
|
|
if(implicit_u != null && implicit_u.permissions != null) |
|
|
|
{ |
|
|
|
|
|
|
|
processPermissions(params, Arrays.asList(implicit_u.permissions)); |
|
|
|
processPermissions(params, Arrays.asList(implicit_u.permissions)); |
|
|
|
} |
|
|
|
|
|
|
|
final ArrayList<RowEntity> applicableEntities = new ArrayList<>(); |
|
|
|
final ArrayList<RowEntity> applicableEntities = new ArrayList<>(); |
|
|
|
final ArrayList<RowPermission> applicablePermissions = new ArrayList<>(); |
|
|
|
final ArrayList<RowPermission> applicablePermissions = new ArrayList<>(); |
|
|
|
final ArrayList<RowInheritance> applicableInheritance = new ArrayList<>(); |
|
|
|
final ArrayList<RowInheritance> applicableInheritance = new ArrayList<>(); |
|
|
@ -116,7 +115,7 @@ public class InternalCache extends InternalStorage |
|
|
|
final RowEntity currentParent = params.parentEntity; |
|
|
|
final RowEntity currentParent = params.parentEntity; |
|
|
|
final String instantiator = params.instantiator; |
|
|
|
final String instantiator = params.instantiator; |
|
|
|
final ArrayList<ResolutionResult> intermediateResults = new ArrayList<>(); |
|
|
|
final ArrayList<ResolutionResult> intermediateResults = new ArrayList<>(); |
|
|
|
params.depth += 1; |
|
|
|
params.branchDepth += 1; |
|
|
|
for(RowInheritance row : params.parentEntity.inheritance) |
|
|
|
for(RowInheritance row : params.parentEntity.inheritance) |
|
|
|
if(isInheritanceApplicable(params, row)) |
|
|
|
if(isInheritanceApplicable(params, row)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -126,8 +125,8 @@ public class InternalCache extends InternalStorage |
|
|
|
: row.instance; |
|
|
|
: row.instance; |
|
|
|
intermediateResults.add(resolveParent(params)); |
|
|
|
intermediateResults.add(resolveParent(params)); |
|
|
|
} |
|
|
|
} |
|
|
|
params.depth -= 1; |
|
|
|
params.branchDepth -= 1; |
|
|
|
params.groupList.add(depthPrefix(params.depth) + currentParent.entity |
|
|
|
params.groupList.add(depthPrefix(params.branchDepth) + currentParent.entity |
|
|
|
+ ("".equals(instantiator) ? "" : Settings.INSTANCE_SEP + instantiator)); |
|
|
|
+ ("".equals(instantiator) ? "" : Settings.INSTANCE_SEP + instantiator)); |
|
|
|
// Prefixes and suffixes
|
|
|
|
// Prefixes and suffixes
|
|
|
|
params.parentEntity = currentParent; |
|
|
|
params.parentEntity = currentParent; |
|
|
|