Ignore:
Timestamp:
Nov 30, 2010, 2:10:42 PM (10 years ago)
Author:
robert@…
Message:

Implemented improved authorisation to give administrators all permissions (ticket #207)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy

    r1206 r1222  
    653653         */
    654654        def studySelect = { attrs ->
    655                 // Find all studies the user has access to
    656                 def user = AuthenticationService.getLoggedInUser()
    657 
    658                 def c = Study.createCriteria()
    659                 attrs.from = c.list {
    660                     or {
    661                         eq( "owner", user )
    662                         writers {
    663                             eq( "id", user.id )
    664                         }
    665                     }
    666                 }
     655                // Find all studies the user has access to (max 100)
     656                attrs.from = Study.giveWritableStudies(AuthenticationService.getLoggedInUser(), 100);
    667657
    668658                // got a name?
Note: See TracChangeset for help on using the changeset viewer.