Index: src/main/java/com/example/moviezone/config/WebSecurityConfig.java
===================================================================
--- src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -32,6 +32,6 @@
         http.csrf().disable()
                 .authorizeRequests()
-                .antMatchers("/","/films","/home/projections","/home/events","/home/getProjections/**","/home/films","/getFilm/**","/getEvent/**","/login","/events","/projections" ,"/home", "/assets/**", "/register", "/api/**").permitAll()
-                .antMatchers("/home/getSeats/**","/myTickets","/getProjection/**","/home/makeReservation").hasRole("USER")
+                .antMatchers("/","/films","/home/projections","/home/events","/home/getProjections/**","/home/films","/home/getFilm/**","/getFilm/**","/home/getEvent/**","/getEvent/**","/login","/events","/projections" ,"/home", "/assets/**", "/register", "/api/**").permitAll()
+                .antMatchers("/home/getSeats/**","/myTickets","/home/addRating/**","/addRating/**","/getProjection/**","/home/makeReservation").hasRole("USER")
                 .antMatchers("/**").hasRole("ADMIN")
                 .anyRequest()
Index: src/main/java/com/example/moviezone/model/manytomany/CustomerRatesFilm.java
===================================================================
--- src/main/java/com/example/moviezone/model/manytomany/CustomerRatesFilm.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/model/manytomany/CustomerRatesFilm.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -30,3 +30,10 @@
     Integer id_film;
 
+    double rating;
+
+    public CustomerRatesFilm(Integer id_customer, Integer id_film, double rating) {
+        this.id_customer = id_customer;
+        this.id_film = id_film;
+        this.rating = rating;
+    }
 }
Index: src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -12,4 +12,4 @@
 @Procedure("project.avg_rating1")
     double avg_rating(int id);
-
+    CustomerRatesFilm save(CustomerRatesFilm customerRatesFilm);
 }
Index: src/main/java/com/example/moviezone/service/CustomerRatesFilmService.java
===================================================================
--- src/main/java/com/example/moviezone/service/CustomerRatesFilmService.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/service/CustomerRatesFilmService.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -1,5 +1,10 @@
 package com.example.moviezone.service;
+
+import com.example.moviezone.model.Customer;
+import com.example.moviezone.model.manytomany.CustomerRatesFilm;
 
 public interface CustomerRatesFilmService {
     double avg_rating(int id);
+    CustomerRatesFilm addRating(Integer id_customer, Integer id_film, double rating);
+
 }
Index: src/main/java/com/example/moviezone/service/Impl/CustomerRatesFilmImpl.java
===================================================================
--- src/main/java/com/example/moviezone/service/Impl/CustomerRatesFilmImpl.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/service/Impl/CustomerRatesFilmImpl.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -1,4 +1,5 @@
 package com.example.moviezone.service.Impl;
 
+import com.example.moviezone.model.manytomany.CustomerRatesFilm;
 import com.example.moviezone.repository.CustomerRatesFilmRepository;
 import com.example.moviezone.service.CustomerRatesFilmService;
@@ -17,3 +18,9 @@
         return customerRatesFilmRepository.avg_rating(id);
     }
+
+    @Override
+    public CustomerRatesFilm addRating(Integer id_customer, Integer id_film, double rating) {
+        CustomerRatesFilm customerRatesFilm=new CustomerRatesFilm(id_customer,id_film,rating);
+        return customerRatesFilmRepository.save(customerRatesFilm);
+    }
 }
Index: src/main/java/com/example/moviezone/web/HomeController.java
===================================================================
--- src/main/java/com/example/moviezone/web/HomeController.java	(revision 01a1ca65391fede764bbb6411df0778ca9c7887f)
+++ src/main/java/com/example/moviezone/web/HomeController.java	(revision 73f0dbc46c55b9ed5af7a74b7dd183c7dd2a6b3c)
@@ -395,4 +395,12 @@
         return "redirect:/myTickets";
     }
+    @PostMapping("/addRating/{id}")
+    public String addRating(@RequestParam Long rate,@PathVariable Long id,HttpServletRequest request, HttpServletResponse respons)
+    {
+        Customer customer=customerService.findByUsername(request.getRemoteUser());
+        System.out.println(customer.getFirst_name());
+        customerRatesFilmService.addRating(customer.getId_user(),Integer.valueOf(id.intValue()),Integer.valueOf(rate.intValue()));
+        return "redirect:/home/getFilm/"+id;
+    }
 
 }
