use of org.jkiss.dbeaver.ext.mysql.model.MySQLGrant in project dbeaver by serge-rider.
the class PrivilegeTableControl method fillGrants.
public void fillGrants(List<MySQLGrant> grants) {
if (grants == null) {
return;
}
for (TableItem item : privTable.getItems()) {
MySQLPrivilege privilege = (MySQLPrivilege) item.getData();
//Button grantCheck = (Button)item.getData("grant");
//, grantOption = false;
boolean checked = false;
for (MySQLGrant grant : grants) {
if (grant.isAllPrivileges() || grant.getPrivileges().contains(privilege) || (grant.isGrantOption() && privilege.isGrantOption())) {
checked = true;
//grantOption = grant.isGrantOption();
break;
}
}
item.setChecked(checked);
//grantCheck.setSelection(grantOption);
}
}
Aggregations