package at.ac.tuwien.inso.service;

import at.ac.tuwien.inso.entity.*;

import java.util.*;

public interface UisUserService {

    List<UisUser> findAllMatching(String searchFilter);

    UisUser findOne(long id);

    boolean existsUserWithIdentificationNumber(String id);
}

package at.ac.tuwien.inso.service;

import org.springframework.security.access.prepost.PreAuthorize;

import at.ac.tuwien.inso.entity.*;

import java.util.*;

public interface UisUserService {

    @PreAuthorize("hasRole('ADMIN')")
    List<UisUser> findAllMatching(String searchFilter);

    @PreAuthorize("hasRole('ADMIN')")
    UisUser findOne(long id);

    @PreAuthorize("isAuthenticated()")
    boolean existsUserWithIdentificationNumber(String id);
}

Add method security for UisUserService