Added new method accessPolicyFromSessionLogin
This commit is contained in:
parent
408780c6b1
commit
6d7f5b9338
|
@ -56,7 +56,7 @@ public class GeportalCheckAccessPolicy {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is accessible accoding to access policies.
|
* Checks if is accessible according to access policies.
|
||||||
*
|
*
|
||||||
* @param policy the policy
|
* @param policy the policy
|
||||||
* @param myLogin the my login
|
* @param myLogin the my login
|
||||||
|
@ -91,4 +91,21 @@ public class GeportalCheckAccessPolicy {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access policy from session login.
|
||||||
|
*
|
||||||
|
* @param mySessionLogin the my session login
|
||||||
|
* @return the access policy
|
||||||
|
*/
|
||||||
|
public static ACCESS_POLICY accessPolicyFromSessionLogin(String mySessionLogin) {
|
||||||
|
|
||||||
|
if (mySessionLogin == null || mySessionLogin.isEmpty()) {
|
||||||
|
// here is not open and the user is not authenticated
|
||||||
|
return ACCESS_POLICY.OPEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ACCESS_POLICY.RESTICTED;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue