remove super_user permission checks as they have been deleted (except for reporting_super_user)

This commit is contained in:
John Woodlock
2013-01-09 15:19:30 +00:00
parent 898aa44db0
commit 029846bda2
12 changed files with 47 additions and 96 deletions
@@ -5,13 +5,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface GLAccountWritePlatformService { public interface GLAccountWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'CREATE_GL_ACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_GL_ACCOUNT')")
Long createGLAccount(GLAccountCommand command); Long createGLAccount(GLAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'UPDATE_GL_ACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_GL_ACCOUNT')")
Long updateGLAccount(Long glAccountId, GLAccountCommand command); Long updateGLAccount(Long glAccountId, GLAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'DELETE_GL_ACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_GL_ACCOUNT')")
Long deleteGLAccount(Long glAccountId); Long deleteGLAccount(Long glAccountId);
} }
@@ -5,13 +5,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface GLClosureWritePlatformService { public interface GLClosureWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'CREATE_GL_CLOSURE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_GL_CLOSURE')")
Long createGLClosure(GLClosureCommand command); Long createGLClosure(GLClosureCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'UPDATE_GL_CLOSURE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_GL_CLOSURE')")
Long updateGLClosure(Long glClosureId, GLClosureCommand command); Long updateGLClosure(Long glClosureId, GLClosureCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'DELETE_GL_CLOSURE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_GL_CLOSURE')")
Long deleteGLClosure(Long glClosureId); Long deleteGLClosure(Long glClosureId);
} }
@@ -5,10 +5,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface GLJournalEntryWritePlatformService { public interface GLJournalEntryWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'CREATE_JOURNAL_ENTRY')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_JOURNAL_ENTRY')")
String createJournalEntry(GLJournalEntryCommand journalEntryCommand); String createJournalEntry(GLJournalEntryCommand journalEntryCommand);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'REVERT_JOURNAL_ENTRY')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'REVERT_JOURNAL_ENTRY')")
String revertJournalEntry(String transactionId); String revertJournalEntry(String transactionId);
} }
@@ -8,13 +8,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface DocumentWritePlatformService { public interface DocumentWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_m_guarantor_external')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_m_guarantor_external')")
Long createDocument(DocumentCommand documentCommand, InputStream inputStream); Long createDocument(DocumentCommand documentCommand, InputStream inputStream);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'UPDATE_m_guarantor_external')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_m_guarantor_external')")
CommandProcessingResult updateDocument(DocumentCommand documentCommand, InputStream inputStream); CommandProcessingResult updateDocument(DocumentCommand documentCommand, InputStream inputStream);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'DELETE_m_guarantor_external')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_m_guarantor_external')")
CommandProcessingResult deleteDocument(DocumentCommand documentCommand); CommandProcessingResult deleteDocument(DocumentCommand documentCommand);
} }
@@ -15,13 +15,13 @@ public interface ClientWritePlatformService {
CommandProcessingResult deleteClient(Long clientId); CommandProcessingResult deleteClient(Long clientId);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_CLIENTIMAGE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_CLIENTIMAGE')")
CommandProcessingResult saveOrUpdateClientImage(Long clientId, String imageName, InputStream inputStream); CommandProcessingResult saveOrUpdateClientImage(Long clientId, String imageName, InputStream inputStream);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_CLIENTIMAGE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_CLIENTIMAGE')")
CommandProcessingResult saveOrUpdateClientImage(Long clientId, Base64EncodedImage encodedImage); CommandProcessingResult saveOrUpdateClientImage(Long clientId, Base64EncodedImage encodedImage);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'DELETE_CLIENTIMAGE')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_CLIENTIMAGE')")
CommandProcessingResult deleteClientImage(Long clientId); CommandProcessingResult deleteClientImage(Long clientId);
CommandProcessingResult addClientNote(Long clientId, JsonCommand command); CommandProcessingResult addClientNote(Long clientId, JsonCommand command);
@@ -6,13 +6,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface GroupWritePlatformService { public interface GroupWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_GROUP')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_GROUP')")
CommandProcessingResult createGroup(GroupCommand command); CommandProcessingResult createGroup(GroupCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'UPDATE_GROUP')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_GROUP')")
CommandProcessingResult updateGroup(GroupCommand command); CommandProcessingResult updateGroup(GroupCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'DELETE_GROUP')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_GROUP')")
CommandProcessingResult deleteGroup(Long groupId); CommandProcessingResult deleteGroup(Long groupId);
} }
@@ -5,13 +5,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface GuarantorWritePlatformService { public interface GuarantorWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS','PORTFOLIO_MANAGEMENT_SUPER_USER')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS')")
void createGuarantor(final Long loanId, final GuarantorCommand command); void createGuarantor(final Long loanId, final GuarantorCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS','PORTFOLIO_MANAGEMENT_SUPER_USER')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS')")
void updateGuarantor(final Long loanId, final GuarantorCommand command); void updateGuarantor(final Long loanId, final GuarantorCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS','PORTFOLIO_MANAGEMENT_SUPER_USER')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS')")
void removeGuarantor(final Long loanId); void removeGuarantor(final Long loanId);
} }
@@ -6,9 +6,9 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface SavingAccountWritePlatformService { public interface SavingAccountWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_SAVINGSACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_SAVINGSACCOUNT')")
CommandProcessingResult createSavingAccount(SavingAccountCommand command); CommandProcessingResult createSavingAccount(SavingAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'UPDATE_SAVINGSACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_SAVINGSACCOUNT')")
CommandProcessingResult updateSavingAccount(SavingAccountCommand command); CommandProcessingResult updateSavingAccount(SavingAccountCommand command);
} }
@@ -6,12 +6,12 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface SavingProductWritePlatformService { public interface SavingProductWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'CREATE_SAVINGSPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_SAVINGSPRODUCT')")
CommandProcessingResult createSavingProduct(SavingProductCommand command); CommandProcessingResult createSavingProduct(SavingProductCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'UPDATE_SAVINGSPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_SAVINGSPRODUCT')")
CommandProcessingResult updateSavingProduct(SavingProductCommand command); CommandProcessingResult updateSavingProduct(SavingProductCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'DELETE_SAVINGSPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_SAVINGSPRODUCT')")
CommandProcessingResult deleteSavingProduct(Long productId); CommandProcessingResult deleteSavingProduct(Long productId);
} }
@@ -14,46 +14,46 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface DepositAccountWritePlatformService { public interface DepositAccountWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'CREATE_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_DEPOSITACCOUNT')")
CommandProcessingResult createDepositAccount(DepositAccountCommand command); CommandProcessingResult createDepositAccount(DepositAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'UPDATE_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_DEPOSITACCOUNT')")
CommandProcessingResult updateDepositAccount(DepositAccountCommand command); CommandProcessingResult updateDepositAccount(DepositAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'DELETE_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_DEPOSITACCOUNT')")
CommandProcessingResult deleteDepositAccount(Long productId); CommandProcessingResult deleteDepositAccount(Long productId);
// NOTE - took out permissions relating to doing things with deposit // NOTE - took out permissions relating to doing things with deposit
// accounts in the past as doesn't appear to be code for it // accounts in the past as doesn't appear to be code for it
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'APPROVE_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'APPROVE_DEPOSITACCOUNT')")
CommandProcessingResult approveDepositApplication(DepositStateTransitionApprovalCommand command); CommandProcessingResult approveDepositApplication(DepositStateTransitionApprovalCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'REJECT_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'REJECT_DEPOSITACCOUNT')")
CommandProcessingResult rejectDepositApplication(DepositStateTransitionCommand command); CommandProcessingResult rejectDepositApplication(DepositStateTransitionCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'WITHDRAW_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'WITHDRAW_DEPOSITACCOUNT')")
CommandProcessingResult withdrawDepositApplication(DepositStateTransitionCommand command); CommandProcessingResult withdrawDepositApplication(DepositStateTransitionCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'APPROVALUNDO_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'APPROVALUNDO_DEPOSITACCOUNT')")
CommandProcessingResult undoDepositApproval(UndoStateTransitionCommand undoCommand); CommandProcessingResult undoDepositApproval(UndoStateTransitionCommand undoCommand);
/* /*
* @PreAuthorize(value = * @PreAuthorize(value =
* "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', '')" ) * "hasAnyRole('ALL_FUNCTIONS', '')" )
* EntityIdentifier matureDepositApplication(DepositStateTransitionCommand * EntityIdentifier matureDepositApplication(DepositStateTransitionCommand
* command); * command);
*/ */
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'WITHDRAWAL_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'WITHDRAWAL_DEPOSITACCOUNT')")
CommandProcessingResult withdrawDepositAccountMoney(DepositAccountWithdrawalCommand command); CommandProcessingResult withdrawDepositAccountMoney(DepositAccountWithdrawalCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER', 'INTEREST_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'INTEREST_DEPOSITACCOUNT')")
CommandProcessingResult withdrawDepositAccountInterestMoney(DepositAccountWithdrawInterestCommand command); CommandProcessingResult withdrawDepositAccountInterestMoney(DepositAccountWithdrawInterestCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'RENEW_DEPOSITACCOUNT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'RENEW_DEPOSITACCOUNT')")
CommandProcessingResult renewDepositAccount(DepositAccountCommand command); CommandProcessingResult renewDepositAccount(DepositAccountCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'PORTFOLIO_MANAGEMENT_SUPER_USER')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS')")
CommandProcessingResult postInterestToDepositAccount(Collection<DepositAccountsForLookup> accounts); CommandProcessingResult postInterestToDepositAccount(Collection<DepositAccountsForLookup> accounts);
} }
@@ -6,12 +6,12 @@ import org.springframework.security.access.prepost.PreAuthorize;
public interface DepositProductWritePlatformService { public interface DepositProductWritePlatformService {
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'CREATE_DEPOSITPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'CREATE_DEPOSITPRODUCT')")
CommandProcessingResult createDepositProduct(DepositProductCommand command); CommandProcessingResult createDepositProduct(DepositProductCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'UPDATE_DEPOSITPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'UPDATE_DEPOSITPRODUCT')")
CommandProcessingResult updateDepositProduct(DepositProductCommand command); CommandProcessingResult updateDepositProduct(DepositProductCommand command);
@PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'ORGANISATION_ADMINISTRATION_SUPER_USER', 'DELETE_DEPOSITPRODUCT')") @PreAuthorize(value = "hasAnyRole('ALL_FUNCTIONS', 'DELETE_DEPOSITPRODUCT')")
CommandProcessingResult deleteDepositProduct(Long productId); CommandProcessingResult deleteDepositProduct(Long productId);
} }
@@ -305,23 +305,23 @@ public class AppUser extends AbstractAuditableCustom<AppUser, Long> implements P
} }
public boolean canNotApproveLoanInPast() { public boolean canNotApproveLoanInPast() {
return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "APPROVEINPAST_LOAN", "PORTFOLIO_MANAGEMENT_SUPER_USER"); return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "APPROVEINPAST_LOAN");
} }
public boolean canNotRejectLoanInPast() { public boolean canNotRejectLoanInPast() {
return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "REJECTINPAST_LOAN", "PORTFOLIO_MANAGEMENT_SUPER_USER"); return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "REJECTINPAST_LOAN");
} }
public boolean canNotWithdrawByClientLoanInPast() { public boolean canNotWithdrawByClientLoanInPast() {
return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "WITHDRAWINPAST_LOAN", "PORTFOLIO_MANAGEMENT_SUPER_USER"); return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "WITHDRAWINPAST_LOAN");
} }
public boolean canNotDisburseLoanInPast() { public boolean canNotDisburseLoanInPast() {
return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "DISBURSEINPAST_LOAN", "PORTFOLIO_MANAGEMENT_SUPER_USER"); return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "DISBURSEINPAST_LOAN");
} }
public boolean canNotMakeRepaymentOnLoanInPast() { public boolean canNotMakeRepaymentOnLoanInPast() {
return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "REPAYMENTINPAST_LOAN", "PORTFOLIO_MANAGEMENT_SUPER_USER"); return hasNotPermissionForAnyOf("ALL_FUNCTIONS", "REPAYMENTINPAST_LOAN");
} }
public boolean hasNotPermissionForReport(final String reportName) { public boolean hasNotPermissionForReport(final String reportName) {
@@ -366,56 +366,7 @@ public class AppUser extends AbstractAuditableCustom<AppUser, Long> implements P
if (!(hasNotPermissionForAnyOf("ALL_FUNCTIONS", "ALL_FUNCTIONS_READ", matchPermission))) return; if (!(hasNotPermissionForAnyOf("ALL_FUNCTIONS", "ALL_FUNCTIONS_READ", matchPermission))) return;
String higherPermission = ""; throw new NoAuthorizationException(authorizationMessage);
if (entityType.equalsIgnoreCase("CHARGE")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CLIENT")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CLIENTNOTE")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CLIENTIDENTIFIER")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CLIENTIMAGE")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CODE")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("CURRENCY")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("DOCUMENTMAN")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("FUND")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("GROUP")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("LOANPRODUCT")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("LOAN")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("OFFICE")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("OFFICETRANSACTION")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("PERMISSION")) {
higherPermission = "USER_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("ROLE")) {
higherPermission = "USER_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("USER")) {
higherPermission = "USER_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("STAFF")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("SAVINGSPRODUCT")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("DEPOSITPRODUCT")) {
higherPermission = "ORGANISATION_ADMINISTRATION_SUPER_USER";
} else if (entityType.equalsIgnoreCase("DEPOSITACCOUNT")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
} else if (entityType.equalsIgnoreCase("SAVINGSACCOUNT")) {
higherPermission = "PORTFOLIO_MANAGEMENT_SUPER_USER";
}
if (!(higherPermission.equals(""))) {
if (hasNotPermissionForAnyOf(higherPermission)) throw new NoAuthorizationException(authorizationMessage);
}
} }
private boolean hasNotPermissionTo(final String permissionCode) { private boolean hasNotPermissionTo(final String permissionCode) {