package at.ac.tuwien.inso.service;

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

import java.util.*;

public interface SubjectService {

    List<Subject> findAll();

    Subject findOne(long id);

    Subject create(Subject subject);

    List<Subject> searchForSubjects(String word);
}

@@ -27,24 +27,92 @@
 service;%0D%0A%0D%0A
+import org.springframework.security.access.prepost.PreAuthorize;%0D%0A%0D%0A
 import at.ac
@@ -205,156 +205,315 @@
     
-List%3CSubject%3E findAll();%0D%0A%0D%0A    Subject findOne(long id);%0D%0A%0D%0A    Subject create(Subject subject);%0D%0A%0D%0A    List%3CSubject%3E searchForSubjects(String word
+@PreAuthorize(%22isAuthenticated()%22)%0D%0A    List%3CSubject%3E findAll();%0D%0A%0D%0A    @PreAuthorize(%22isAuthenticated()%22)%0D%0A    Subject findOne(long id);%0D%0A%0D%0A    @PreAuthorize(%22isAuthenticated()%22)%0D%0A    List%3CSubject%3E searchForSubjects(String word);%0D%0A%0D%0A    @PreAuthorize(%22hasRole('ADMIN')%22)%0D%0A    Subject create(Subject subject
 );%0D%0A

Add method security for SubjectService