Changeset a69d48c for src/main/java/com/example/moviezone
- Timestamp:
- 02/06/23 18:12:03 (23 months ago)
- Branches:
- master
- Children:
- b5ce654
- Parents:
- f9cc555
- Location:
- src/main/java/com/example/moviezone
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/config/WebSecurityConfig.java
rf9cc555 ra69d48c 32 32 http.csrf().disable() 33 33 .authorizeRequests() 34 .antMatchers("/","/ home/getFilm/**","/home", "/assets/**", "/register", "/api/**").permitAll()34 .antMatchers("/","/**","/home/getFilm/**","/films","/projections" ,"/home", "/assets/**", "/register", "/api/**").permitAll() 35 35 .antMatchers("/admin/**").hasRole("ADMIN") 36 36 .anyRequest() -
src/main/java/com/example/moviezone/service/Impl/UserServiceImpl.java
rf9cc555 ra69d48c 56 56 if(role.equals(Role.ROLE_ADMIN)) 57 57 { 58 Worker worker=new Worker(passwordEncoder.encode(password),first_name,last_name,username,email,number);59 workerRepository.save( worker);60 return userRepository.save( worker);58 User user= new User(passwordEncoder.encode(password),first_name,last_name,username,email,number); 59 workerRepository.save((Worker) user); 60 return userRepository.save(user); 61 61 } 62 62 else
Note:
See TracChangeset
for help on using the changeset viewer.