private boolean hasAccess(Field f, Operation op) { EntityAccess eaccess = md.getAccess(); switch (op) { case insert: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles); case update: return getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case insert_and_update: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles) && getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case find: return getEffAccess(f, FIND_ACC, eaccess.getFind()).hasAccess(roles); } return false; }
private boolean hasAccess(Field f, Operation op) { EntityAccess eaccess = md.getAccess(); switch (op) { case insert: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles); case update: return getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case insert_and_update: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles) && getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case find: return getEffAccess(f, FIND_ACC, eaccess.getFind()).hasAccess(roles); } return false; }
private boolean hasAccess(Field f, Operation op) { EntityAccess eaccess = md.getAccess(); switch (op) { case insert: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles); case update: return getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case insert_and_update: return getEffAccess(f, INS_ACC, eaccess.getInsert()).hasAccess(roles) && getEffAccess(f, UPD_ACC, eaccess.getUpdate()).hasAccess(roles); case find: return getEffAccess(f, FIND_ACC, eaccess.getFind()).hasAccess(roles); } return false; }