add authorization to role and user services.

This commit is contained in:
Keith Woodlock
2012-05-28 22:15:38 +01:00
parent 682b11f78e
commit 0fb05315ea
2 changed files with 7 additions and 0 deletions
@@ -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);
}
@@ -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);
}