public interface SessionData extends RoleContainer, org.cyclos.impl.access.UserPrincipal
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
Channel |
getAccessChannel()
Returns the original channel (i.e the channel used to access Cyclos) this session is using
|
java.lang.String |
getAccessChannelName()
Returns the internal name of the original channel (i.e the channel used to access Cyclos) .
|
java.util.Set<BasicGroup> |
getAccessibleBasicGroups()
Returns the basic groups accessible by the current session
|
UserAuthVO |
getAuthenticatedUser()
Returns the user authentication data, or null if none
|
Channel |
getChannel()
Returns the current channel this session is using
|
org.cyclos.impl.system.ChannelAccessAccessor |
getChannelAccessAccessor()
Returns the accessor for the access channel (i.e the original channel used to access Cyclos) access settings.
|
java.lang.String |
getChannelName()
Returns the internal name of the current channel.
|
org.cyclos.impl.system.ChannelSettingsAccessor |
getChannelSettingsAccessor()
Returns the accessor for the current channel (i.e the channel used to run the service method) general settings.
|
ConfigurationAccessor |
getConfiguration()
Returns the configuration accessor
|
Group |
getGroup()
Returns the group of the authenticated user, if any
|
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
Operator |
getLoggedOperator()
Returns the authenticated operator, or null if none or the logged is not an operator
|
User |
getLoggedUser()
Returns the authenticated user, or null if none
|
Network |
getNetwork()
Returns the network this session is using, or null if as global system or administrator
|
Pin |
getPin()
Returns the
Pin used for this session only if the user was authenticated using such mechanism. |
org.cyclos.impl.users.ProductsAccessor |
getProducts()
Returns the products accessor
|
java.lang.String |
getRemoteAddress()
Returns the remote address, of the client accessing the application
|
RequestData |
getRequestData()
Returns data about the calling request.
|
Session |
getSession()
Returns the session in case this session data performed a login
|
org.cyclos.impl.access.SessionDataSubjectId |
getSubjectId()
Returns the subject id
|
boolean |
hasPermission(Permission permission)
Returns whether the current user has the given permission
|
boolean |
hasRequiredValue(Permission permission,
java.lang.Object value)
Returns whether the current user has access to the given required value for the given permission
|
boolean |
isAdminOf(BasicUser user)
Returns whether the current user is an administrator of the given user
|
boolean |
isBrokerOf(BasicUser user)
Returns whether the current user is a broker of the given user
|
boolean |
isGlobalAdminInNetwork()
Returns whether a global admin OR a global restricted has switched to a network.
|
boolean |
isGuest()
Returns whether the current session represents a guest
|
boolean |
isLoggedIn()
Returns whether the current session represents a user
|
boolean |
isManagerOf(BasicUser user)
Returns whether the current user is a manager of the given user and is not the given user.
|
boolean |
isMemberOnly()
Returns true if the logged user has only
Role member. |
boolean |
isMultiNetworkAdminInGlobalMode()
Returns whether a global restricted has not switched to a network.
|
boolean |
isOwnerOf(BasicUser operator)
Returns whether current user is either the owner member of a given operator or as another alias operator
|
default boolean |
isRest()
Returns whether this session was initiated from a REST request
|
boolean |
isScript()
Returns whether this session is running under a script
|
boolean |
isSystem()
Returns whether the current session represents a system task
|
boolean |
isVisible(org.cyclos.impl.access.EntityCheck<SimpleEntity> entityCheck,
SimpleEntity entity)
Returns whether the given entity is visible under the given entity check
|
boolean |
manages(BasicUser user)
Returns whether the current user manages the given user.
|
boolean |
relatesTo(BasicUser user)
Returns whether the current user is related to (is allowed to view) the given user
|
isAdmin, isAliasOperator, isBroker, isGlobalAdmin, isMember, isNetworkAdmin, isOperator, isRestrictedOperator, isUserManagervoid checkConsistency()
throws InvalidSessionDataException
InvalidSessionDataExceptionChannel getAccessChannel()
java.lang.String getAccessChannelName()
java.util.Set<BasicGroup> getAccessibleBasicGroups()
UserAuthVO getAuthenticatedUser()
Channel getChannel()
org.cyclos.impl.system.ChannelAccessAccessor getChannelAccessAccessor()
java.lang.String getChannelName()
org.cyclos.impl.system.ChannelSettingsAccessor getChannelSettingsAccessor()
ConfigurationAccessor getConfiguration()
Group getGroup()
BasicUser getLoggedBasicUser()
Operator getLoggedOperator()
User getLoggedUser()
Network getNetwork()
Pin getPin()
Pin used for this session only if the user was authenticated using such mechanism.org.cyclos.impl.users.ProductsAccessor getProducts()
java.lang.String getRemoteAddress()
RequestData getRequestData()
Session getSession()
org.cyclos.impl.access.SessionDataSubjectId getSubjectId()
boolean hasPermission(Permission permission)
boolean hasRequiredValue(Permission permission, java.lang.Object value)
boolean isAdminOf(BasicUser user)
boolean isBrokerOf(BasicUser user)
boolean isGlobalAdminInNetwork()
boolean isGuest()
boolean isLoggedIn()
boolean isManagerOf(BasicUser user)
boolean isMemberOnly()
Role member.boolean isMultiNetworkAdminInGlobalMode()
boolean isOwnerOf(BasicUser operator)
default boolean isRest()
boolean isScript()
boolean isSystem()
boolean isVisible(org.cyclos.impl.access.EntityCheck<SimpleEntity> entityCheck, SimpleEntity entity)
boolean manages(BasicUser user)
boolean relatesTo(BasicUser user)