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.sources.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 SourcesPermissionProvider implements IPermissionProvider
15  {
16      /**
17       * {@inheritDoc }
18       */
19      @Override
20      public Collection<Permission> providePermissionList()
21      {
22          List<Permission> listPermission = new ArrayList<>();
23          
24          Permission permissionViewSourcesDemands = new Permission();
25          permissionViewSourcesDemands.setCode( "PERMISSION_VIEW_SOURCES_DEMANDS");
26          permissionViewSourcesDemands.setLabel( "Permission de voir les demandes d'ajout de referentiel de sources" );
27          permissionViewSourcesDemands.setResourceTypeKey( "APP" );
28          listPermission.add( permissionViewSourcesDemands );
29                  
30          Permission permissionAddRepo = new Permission();
31          permissionAddRepo.setCode( "PERMISSION_ADD_REPO");
32          permissionAddRepo.setLabel( "Permission d'ajouter des repos sources et des utilisateurs" );
33          permissionAddRepo.setResourceTypeKey( "APP" );
34          listPermission.add( permissionAddRepo );
35          
36          return listPermission;
37      }
38      
39  }