add server in version 0.5.0 as initial commit for future work on github

This commit is contained in:
Felix Förtsch
2018-04-26 21:45:52 +02:00
parent a22c06a222
commit 7542d769b8
205 changed files with 9790 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package de.ul.swtp.system;
import de.ul.swtp.modules.contactmanagement.Group;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.access.prepost.PreAuthorize;
import java.util.List;
public interface UserManager {
@PreAuthorize("hasAuthority('SYS_USER_GETALL') or hasAuthority('ROLE_ADMIN')")
Page<User> getAll(Pageable pageable);
@PreAuthorize("hasAuthority('SYS_USER_GETUSERBYID') or hasAuthority('ROLE_ADMIN')")
User getUserById(Long id);
@PreAuthorize("hasAuthority('SYS_USER_GETUSERSBYIDS') or hasAuthority('ROLE_ADMIN')")
Page<User> getUsersByIds(List<Long> userIds, Pageable pageable);
@PreAuthorize("hasAuthority('SYS_USER_GETUSERBYUSERNAME') or hasAuthority('ROLE_ADMIN')")
User getUserByUsername(String username);
@PreAuthorize("hasAuthority('SYS_USER_GETALLBYROLE') or hasAuthority('ROLE_ADMIN')")
List<User> getAllByRole(Role role);
@PreAuthorize("hasAuthority('SYS_USER_GETALLBYGROUP') or hasAuthority('ROLE_ADMIN')")
List<User> getAllByGroup(Group group);
@PreAuthorize("hasAuthority('SYS_USER_CREATE') or hasAuthority('ROLE_ADMIN')")
User create(User user);
@PreAuthorize("hasAuthority('SYS_USER_UPDATE') or hasAuthority('ROLE_ADMIN')")
User update(Long id, User user);
@PreAuthorize("hasAuthority('SYS_USER_UPDATE') or hasAuthority('ROLE_ADMIN')")
User updateWithoutTouchingAcl(Long id, User user);
@PreAuthorize("hasAuthority('SYS_USER_DELETE') or hasAuthority('ROLE_ADMIN')")
void delete(Long id);
void enableUser(Long id);
User signUpUser(User user);
}