package at.ac.tuwien.inso.service;

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

import java.util.*;

public interface LecturerService {
    Lecturer getLoggedInLecturer();

    Iterable<Subject> getOwnSubjects();

    List<Subject> findSubjectsFor(Lecturer lecturer);
}

package at.ac.tuwien.inso.service;

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

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

import java.util.*;

public interface LecturerService {

    @PreAuthorize("hasRole('LECTURER')")
    Lecturer getLoggedInLecturer();

    @PreAuthorize("hasRole('LECTURER')")
    Iterable<Subject> getOwnSubjects();

    @PreAuthorize("isAuthenticated()")
    List<Subject> findSubjectsFor(Lecturer lecturer);
}

Add method security for LecturerService