Project

General

Profile

« Previous | Next » 

Revision 99a498e7

Added by Andreas Kohlbecker almost 6 years ago

ref #7534 fixing submitter filter for continue mode

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/ListPresenter.java
152 152
     */
153 153
    private Pager<RegistrationDTO> pageRegistrations(TextField textFieldOverride, String alternativeText) {
154 154

  
155
        // list all if the authenticated user is having the role CURATION of if it is an admin
156
        Authentication authentication = currentSecurityContext().getAuthentication();
157

  
158 155
        // prepare the filters
159 156
        SearchFilter filter = loadFilterFromView();
160 157
        if(textFieldOverride != null && textFieldOverride == getView().getIdentifierFilter()){
......
177 174
            }
178 175
        }
179 176

  
180

  
181 177
        if(getView().getViewMode().equals(ListView.Mode.inProgress)){
182 178
            filter.registrationStatus = inProgressStatus;
183 179
        }
......
260 256
     *
261 257
     */
262 258
    public SearchFilter loadFilterFromView() {
259

  
260
        Authentication authentication = currentSecurityContext().getAuthentication();
261

  
263 262
        SearchFilter filter = new SearchFilter();
264 263
        filter.identifierPattern = getView().getIdentifierFilter().getValue();
265 264
        filter.namePattern = getView().getTaxonNameFilter().getValue();
......
268 267
            if(o != null){
269 268
                filter.submitter = (User)o;
270 269
            }
270
        } else {
271
            filter.submitter = (User) authentication.getPrincipal();
271 272
        }
272 273
        filter.typeStatus = (Set<TypeDesignationStatusBase>) getView().getStatusTypeFilter().getValue();
273 274
        EnumSet<RegistrationStatus> registrationStatusFilter = null;

Also available in: Unified diff