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.support.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 SupportPermissionProvider implements IPermissionProvider
15  {
16      /**
17       * {@inheritDoc }
18       */
19      @Override
20      public Collection<Permission> providePermissionList()
21      {
22          List<Permission> listPermission = new ArrayList<>();
23          
24          Permission permissionViewSupportsDemands = new Permission();
25          permissionViewSupportsDemands.setCode( "PERMISSION_VIEW_SUPPORT_DEMANDS");
26          permissionViewSupportsDemands.setLabel( "Permission de voir les demandes de support" );
27          permissionViewSupportsDemands.setResourceTypeKey( "APP" );
28          listPermission.add( permissionViewSupportsDemands );
29                  
30          Permission permissionCreateSupportDemand = new Permission();
31          permissionCreateSupportDemand.setCode( "PERMISSION_CREATE_SUPPORT_DEMAND");
32          permissionCreateSupportDemand.setLabel( "Permission d'ajouter de creer une demande de support" );
33          permissionCreateSupportDemand.setResourceTypeKey( "APP" );
34          listPermission.add( permissionCreateSupportDemand );
35          
36          Permission permissionDownloadSupportFile = new Permission();
37          permissionDownloadSupportFile.setCode( "PERMISSION_SUPPORT_DOWNLOAD_FILE");
38          permissionDownloadSupportFile.setLabel( "Permission de telecharger un fichier associe a une demande de support" );
39          permissionDownloadSupportFile.setResourceTypeKey( "APP" );
40          listPermission.add( permissionDownloadSupportFile );
41          
42          return listPermission;
43      }
44      
45  }