Project

General

Profile

Download (861 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.permission;
10

    
11
import eu.etaxonomy.cdm.model.common.CdmBase;
12
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
13
import eu.etaxonomy.vaadin.permission.EditPermissionTester;
14

    
15
/**
16
 * To be used for {@link ToManyRelatedEntitiesComboboxSelect}
17
 *
18
 * @author a.kohlbecker
19
 * @since Apr 20, 2018
20
 *
21
 */
22
public class CdmEditDeletePermissionTester implements EditPermissionTester {
23
    @Override
24
    public boolean userHasEditPermission(Object bean) {
25
        return  VaadinUserHelper.fromSession().userHasPermission((CdmBase)bean, CRUD.UPDATE, CRUD.DELETE);
26
    }
27
}
(5-5/10)