Various fixes and changes, security problems fixed, bugs resolved.

* Application status is now policed through APPLICATION_STATUS_ROUTES.
* Blacklisted application cannot be accepted.
* Blacklists are checked case insensitively.
* The template now shows blacklist advisories
* Applications are no longer flagged as Blacklisted unless they have a blacklist entry
This commit is contained in:
2011-07-09 11:05:59 +01:00
parent 99a2c14fe6
commit 2b3db4b383
5 changed files with 37 additions and 18 deletions

View File

@@ -22,6 +22,17 @@ APPLICATION_STATUS_CHOICES = (
(APPLICATION_STATUS_FLAGGED, 'Flagged For Review'),
)
# Routes that are allowed (Accept/Reject are managed seperately)
APPLICATION_STATUS_ROUTES = {
APPLICATION_STATUS_NOTSUBMITTED: [APPLICATION_STATUS_AWAITINGREVIEW],
APPLICATION_STATUS_AWAITINGREVIEW: [APPLICATION_STATUS_NOTSUBMITTED, APPLICATION_STATUS_QUERY, APPLICATION_STATUS_FLAGGED],
APPLICATION_STATUS_REJECTED: [],
APPLICATION_STATUS_ACCEPTED: [APPLICATION_STATUS_COMPLETED],
APPLICATION_STATUS_QUERY: [],
APPLICATION_STATUS_COMPLETED: [],
APPLICATION_STATUS_FLAGGED: [],
}
# Audit Event Type Codes
AUDIT_EVENT_STATUSCHANGE = 0
AUDIT_EVENT_NOTE = 1