Ignore:
Timestamp:
Mar 22, 2011, 3:49:47 PM (8 years ago)
Author:
robert@…
Message:

Implemented authorization checks on file downloads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/nl/tno/metagenomics/integration/TrashService.groovy

    r20 r22  
    22
    33import nl.tno.metagenomics.*
     4import nl.tno.metagenomics.auth.Auth;
     5
    46
    57class TrashService {
     
    327329                def study = new Study( name: "Trashcan", studyToken: "trash", trashcan: true )
    328330                study.save();
     331        }
     332       
     333        /**
     334         * Sets up authorization for the trashcan study
     335         */
     336        def setupAuthorization = { study, admin ->
     337                if( study && admin ) {
     338                        def a = Auth.createAuth(study, admin);
     339                        a.canRead = true;
     340                        a.canWrite = true;
     341                        a.isOwner = true;
     342                        a.save();
     343                }
    329344        }
    330345
Note: See TracChangeset for help on using the changeset viewer.