View Javadoc
1   /*
2    * To change this license header, choose License Headers in Project Properties.
3    * To change this template file, choose Tools | Templates
4    * and open the template in the editor.
5    */
6   package fr.paris.lutece.plugins.appcenter.modules.openam.service;
7   
8   import fr.paris.lutece.plugins.appcenter.business.Permission;
9   import fr.paris.lutece.plugins.appcenter.service.IPermissionProvider;
10  import java.util.ArrayList;
11  import java.util.Collection;
12  import java.util.List;
13  
14  public class OpenamPermissionProvider implements IPermissionProvider
15  {
16      /**
17       * {@inheritDoc }
18       */
19      @Override
20      public Collection<Permission> providePermissionList()
21      {
22          List<Permission> listPermission = new ArrayList<>();
23          
24          Permission permissionViewOpenamDemands = new Permission();
25          permissionViewOpenamDemands.setCode( "PERMISSION_VIEW_OPENAM_DEMANDS");
26          permissionViewOpenamDemands.setLabel( "Permission de voir les demandes Openam" );
27          permissionViewOpenamDemands.setResourceTypeKey( "ENV" );
28          listPermission.add( permissionViewOpenamDemands );
29                  
30          Permission permissionCreateOpenamDemand = new Permission();
31          permissionCreateOpenamDemand.setCode( "PERMISSION_CREATE_OPENAM_DEMAND");
32          permissionCreateOpenamDemand.setLabel( "Permission de creer des demandes Openam" );
33          permissionCreateOpenamDemand.setResourceTypeKey( "ENV" );
34          listPermission.add( permissionCreateOpenamDemand );
35          
36          return listPermission;
37      }
38      
39  }