public boolean hasRole(Role role, String perunBeanName, int id) { //Use converted beanName instead of classic bean name, because for ex.: RichGroup is the same like Group for this purpose String convertedBeanName = BeansUtils.convertRichBeanNameToBeanName(perunBeanName); return this.get(role).containsKey(convertedBeanName) && this.get(role).get(convertedBeanName).contains(id); }
public boolean hasRole(Role role, PerunBean perunBean) { //Use converted beanName instead of classic bean name, because for ex.: RichGroup is the same like Group for this purpose String convertedBeanName = BeansUtils.convertRichBeanNameToBeanName(perunBean.getBeanName()); return this.get(role).containsKey(convertedBeanName) && this.get(role).get(convertedBeanName).contains(perunBean.getId()); }