use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class ResetAdminLogAction method isSupported.
/**
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj Object
* @return boolean(whether to support)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo serverUserInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (serverUserInfo == null || !serverUserInfo.isAdmin()) {
return false;
}
if (CubridNodeType.LOGS_BROKER_ADMIN_LOG.equals(node.getType())) {
return true;
}
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class TimeSetAction method isSupported.
/**
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj Object
* @return boolean(whether to support)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo serverUserInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (serverUserInfo == null || !serverUserInfo.isAdmin()) {
return false;
}
if (CubridNodeType.BROKER_SQL_LOG.equals(node.getType()) || CubridNodeType.BROKER_SQL_LOG_FOLDER.equals(node.getType())) {
return true;
}
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class RemoveAllAccessLogAction method isSupported.
/**
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj Object
* @return boolean(whether to support)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo serverUserInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (serverUserInfo == null || !serverUserInfo.isAdmin()) {
return false;
}
if (CubridNodeType.LOGS_BROKER_ACCESS_LOG_FOLDER.equals(node.getType())) {
return true;
}
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class RemoveAllDbLogAction method isSupported.
/**
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj Object
* @return boolean(whether to support)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo serverUserInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (serverUserInfo == null || !serverUserInfo.isAdmin()) {
return false;
}
if (CubridNodeType.LOGS_SERVER_DATABASE_FOLDER.equals(node.getType())) {
return true;
}
}
return false;
}
use of com.cubrid.cubridmanager.core.common.model.ServerUserInfo in project cubrid-manager by CUBRID.
the class AnalyzeSqlLogAction method isSupported.
/**
* @see com.cubrid.common.ui.spi.action.ISelectionAction#isSupported(java
* .lang.Object)
* @param obj Object
* @return boolean(whether to support)
*/
public boolean isSupported(Object obj) {
if (obj instanceof ICubridNode) {
ICubridNode node = (ICubridNode) obj;
if (node.getServer() == null) {
return false;
}
ServerUserInfo serverUserInfo = node.getServer().getServerInfo().getLoginedUserInfo();
if (serverUserInfo == null || serverUserInfo.getCasAuth() != CasAuthType.AUTH_ADMIN) {
return false;
}
if (CubridNodeType.BROKER_SQL_LOG.equals(node.getType()) || CubridNodeType.BROKER_SQL_LOG_FOLDER.equals(node.getType())) {
return true;
}
}
return false;
}
Aggregations