* This file is part of XEMELIOS.
*
* XEMELIOS is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* XEMELIOS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with XEMELIOS; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import fr.gouv.finances.dgfip.xemelios.auth.impl.std.db.DataHelper;
import fr.gouv.finances.dgfip.utils.Pair;
import fr.gouv.finances.dgfip.xemelios.auth.XemeliosUser;
+import fr.gouv.finances.dgfip.xemelios.common.config.DocumentModel;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
}// </editor-fold>//GEN-END:initComponents
private void pbBrowseRefActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pbBrowseRefActionPerformed
+ XemeliosUser browseUser = new XemeliosUser() {
+
+ @Override
+ public String getId() {
+ return "ref-browse";
+ }
+
+ @Override
+ public String getDisplayName() {
+ return "Utilisateur d'administration";
+ }
+
+ @Override
+ public boolean hasRole(String role) {
+ if(ROLE_BROWSE.equals(role) || ROLE_SEARCH.equals(role))
+ return true;
+ return false;
+ }
+
+ @Override
+ public boolean hasDocument(String document) {
+ if("ref-collec-spl".equals(document))
+ return true;
+ return false;
+ }
+
+ @Override
+ public boolean hasCollectivite(String collectivite, DocumentModel dm) {
+ return true;
+ }
+ };
DlgBrowseReferentiel dlg = new DlgBrowseReferentiel(parent, user, applicationProperties);
Pair ret = dlg.run();
if(ret!=null) {