add authorization to role and user services.
This commit is contained in:
+4
@@ -1,12 +1,16 @@
|
||||
package org.mifosng.platform.user.service;
|
||||
|
||||
import org.mifosng.data.command.UserCommand;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
public interface AppUserWritePlatformService {
|
||||
|
||||
@PreAuthorize(value = "hasRole('USER_ADMINISTRATION_SUPER_USER_ROLE')")
|
||||
Long createUser(final UserCommand command);
|
||||
|
||||
@PreAuthorize(value = "hasRole('USER_ADMINISTRATION_SUPER_USER_ROLE')")
|
||||
Long updateUser(final UserCommand command);
|
||||
|
||||
@PreAuthorize(value = "hasRole('USER_ADMINISTRATION_SUPER_USER_ROLE')")
|
||||
void deleteUser(final Long userId);
|
||||
}
|
||||
+3
@@ -1,10 +1,13 @@
|
||||
package org.mifosng.platform.user.service;
|
||||
|
||||
import org.mifosng.data.command.RoleCommand;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
public interface RoleWritePlatformService {
|
||||
|
||||
@PreAuthorize(value = "hasRole('USER_ADMINISTRATION_SUPER_USER_ROLE')")
|
||||
Long createRole(RoleCommand command);
|
||||
|
||||
@PreAuthorize(value = "hasRole('USER_ADMINISTRATION_SUPER_USER_ROLE')")
|
||||
Long updateRole(RoleCommand command);
|
||||
}
|
||||
Reference in New Issue
Block a user