added trim on user name
This commit is contained in:
parent
4cdd9627b7
commit
3b016ace03
|
@ -438,11 +438,11 @@ implements AuthManagerService {
|
||||||
logger.debug("policy translate:"+policy.getCallerTypeAsString());
|
logger.debug("policy translate:"+policy.getCallerTypeAsString());
|
||||||
if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.user.toString())){
|
if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.user.toString())){
|
||||||
logger.debug("add policy with user");
|
logger.debug("add policy with user");
|
||||||
policies.add(new User2ServicePolicy(context, service, Users.one(policy.getCallerAsString()), access ));
|
policies.add(new User2ServicePolicy(context, service, Users.one(policy.getCallerAsString().trim()), access ));
|
||||||
}
|
}
|
||||||
else if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.role.toString())){
|
else if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.role.toString())){
|
||||||
logger.debug("add policy with role");
|
logger.debug("add policy with role");
|
||||||
policies.add(new User2ServicePolicy(context, service, Roles.one(policy.getCallerAsString()), access ));
|
policies.add(new User2ServicePolicy(context, service, Roles.one(policy.getCallerAsString().trim()), access ));
|
||||||
}
|
}
|
||||||
else if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.service.toString())){
|
else if (policy.getCallerTypeAsString().equalsIgnoreCase(TypeCaller.service.toString())){
|
||||||
logger.debug("add policy with service");
|
logger.debug("add policy with service");
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class PolicyAuth implements Serializable {
|
||||||
int count =0;
|
int count =0;
|
||||||
for (Caller caller:this.caller){
|
for (Caller caller:this.caller){
|
||||||
if (!caller.getCallerName().equals("ALL")){
|
if (!caller.getCallerName().equals("ALL")){
|
||||||
callerNameString[count]=caller.getCallerName();
|
callerNameString[count]=caller.getCallerName().trim();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue