ausaccessfed/federationregistry — pull request #151 by vladimir-mencl-eresearch (2014-01-23 01:44:50+00:00)
Title: Migration scripts: fix permissions handling, permission types and check for existing roles

Hi Bradley,

As discussed in http://support.aaf.edu.au/requests/2439 - this pull request brings in the following changes:

* The migration script createSQLDataMigration.groovy excludes some Roles from migration (in particular, SYSTEM ADMINISTRATORS).
** FIX: delete from the Permissions table all entries pointing to the excluded roles.

* Modify both versions of createFRBaseEnvironment.groovy (both in setup and upgrade/major-rleases/2) to use wildcardPermission (Permission.defaultPerm) instead of adminPerm (which points to AllPermission).
** The notation Permission.defaultPerm is consistent with the rest of the code base (and is synonymous with Permission.wildcardPerm).

* Make scripts/upgrades/major-release/2/createFRBaseEnvironment.groovy check if the Roles, Permissions and Subjects already exist before creating them.
** That makes this script restartable - and also works around situation when a role introduced it FR2 (like federation-reporting) had been manually created in an FR 1.x instance.